Skip to content

Commit bcb4e01

Browse files
authored
Merge branch 'master' into amit/catalog-detail
2 parents 1c010ef + dfb799c commit bcb4e01

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

src/custom/Modal/index.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Box, Dialog, IconButton, Paper, Typography } from '../../base';
44
import { ContainedButton, OutlinedButton, TextButton } from '../../base/Button/Button';
55
import { iconLarge, iconMedium } from '../../constants/iconsSizes';
66
import { CloseIcon, InfoCircleIcon } from '../../icons';
7+
import { darkModalGradient, lightModalGradient } from '../../theme/colors/colors';
78
import { CustomTooltip } from '../CustomTooltip';
89

910
interface ModalProps extends DialogProps {
@@ -54,8 +55,8 @@ const StyledDialog = styled(Dialog)`
5455
}
5556
`;
5657

57-
export const ModalStyledHeader = styled('div')(() => ({
58-
background: 'linear-gradient(90deg, #3B687B 0%, #507D90 100%)',
58+
export const ModalStyledHeader = styled('div')(({ theme }) => ({
59+
background: theme.palette.mode === 'light' ? lightModalGradient.header : darkModalGradient.header,
5960
color: '#eee',
6061
display: 'flex',
6162
justifyContent: 'space-between',
@@ -108,15 +109,20 @@ const StyledFooter = styled('div', {
108109
shouldForwardProp: (prop) => prop !== 'variant'
109110
})<ModalFooterProps>(({ theme, variant, hasHelpText }) => ({
110111
background:
111-
variant == 'filled' ? 'linear-gradient(90deg, #3B687B 0%, #507D90 100%)' : 'transparent',
112+
variant === 'filled'
113+
? theme.palette.mode === 'light'
114+
? lightModalGradient.fotter
115+
: darkModalGradient.fotter
116+
: 'transparent',
112117
display: 'flex',
113118
alignItems: 'center',
114119
justifyContent: hasHelpText ? 'space-between' : 'end',
115120
padding: '1rem',
116121
gap: '1rem',
117122

118123
'&& .InfoCircleIcon': {
119-
color: variant == 'filled' ? theme.palette.common.white : theme.palette.background.info?.default
124+
color:
125+
variant === 'filled' ? theme.palette.common.white : theme.palette.background.info?.default
120126
}
121127
}));
122128

src/theme/colors/colors.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const KEPPEL = '#00B39F';
77
export const DARK_KEPPEL = '#00A18F';
88
export const CARIBBEAN_GREEN = '#00D3A9';
99
export const TEAL_BLUE = '#477E96';
10+
export const DARK_TEAL_BLUE = '#3B687B';
1011
export const CHARCOAL = '#3C494F';
1112
export const BLACK = '#000000';
1213
export const MIDNIGHT_BLACK = '#111111';
@@ -324,6 +325,15 @@ export const buttonDelete = {
324325
hover: redDelete.light
325326
};
326327

328+
export const darkModalGradient = {
329+
header: `linear-gradient(90deg, ${charcoal[30]} 0%, ${accentGrey[30]} 100%)`,
330+
fotter: `linear-gradient(90deg, ${accentGrey[30]} 0%, ${charcoal[30]} 100%)`
331+
};
332+
333+
export const lightModalGradient = {
334+
header: `linear-gradient(90deg, ${TEAL_BLUE} 0%, ${DARK_TEAL_BLUE} 100%)`,
335+
fotter: `linear-gradient(90deg, ${DARK_TEAL_BLUE} 0%, ${TEAL_BLUE} 100%)`
336+
};
327337
/**
328338
* Notification Colors
329339
*/

src/theme/palette.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ export const lightModePalette: PaletteOptions = {
307307
export const darkModePalette: PaletteOptions = {
308308
background: {
309309
default: Colors.charcoal[10],
310-
secondary: Colors.accentGrey[10],
310+
secondary: Colors.accentGrey[20],
311311
tertiary: Colors.accentGrey[30],
312312
hover: Colors.charcoal[20],
313313
supplementary: Colors.accentGrey[40],

0 commit comments

Comments
 (0)