Skip to content

Commit

Permalink
Merge branch 'master' into amit/catalog-detail
Browse files Browse the repository at this point in the history
  • Loading branch information
amitamrutiya authored Oct 30, 2024
2 parents 1c010ef + dfb799c commit bcb4e01
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
14 changes: 10 additions & 4 deletions src/custom/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Box, Dialog, IconButton, Paper, Typography } from '../../base';
import { ContainedButton, OutlinedButton, TextButton } from '../../base/Button/Button';
import { iconLarge, iconMedium } from '../../constants/iconsSizes';
import { CloseIcon, InfoCircleIcon } from '../../icons';
import { darkModalGradient, lightModalGradient } from '../../theme/colors/colors';
import { CustomTooltip } from '../CustomTooltip';

interface ModalProps extends DialogProps {
Expand Down Expand Up @@ -54,8 +55,8 @@ const StyledDialog = styled(Dialog)`
}
`;

export const ModalStyledHeader = styled('div')(() => ({
background: 'linear-gradient(90deg, #3B687B 0%, #507D90 100%)',
export const ModalStyledHeader = styled('div')(({ theme }) => ({
background: theme.palette.mode === 'light' ? lightModalGradient.header : darkModalGradient.header,
color: '#eee',
display: 'flex',
justifyContent: 'space-between',
Expand Down Expand Up @@ -108,15 +109,20 @@ const StyledFooter = styled('div', {
shouldForwardProp: (prop) => prop !== 'variant'
})<ModalFooterProps>(({ theme, variant, hasHelpText }) => ({
background:
variant == 'filled' ? 'linear-gradient(90deg, #3B687B 0%, #507D90 100%)' : 'transparent',
variant === 'filled'
? theme.palette.mode === 'light'
? lightModalGradient.fotter
: darkModalGradient.fotter
: 'transparent',
display: 'flex',
alignItems: 'center',
justifyContent: hasHelpText ? 'space-between' : 'end',
padding: '1rem',
gap: '1rem',

'&& .InfoCircleIcon': {
color: variant == 'filled' ? theme.palette.common.white : theme.palette.background.info?.default
color:
variant === 'filled' ? theme.palette.common.white : theme.palette.background.info?.default
}
}));

Expand Down
10 changes: 10 additions & 0 deletions src/theme/colors/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const KEPPEL = '#00B39F';
export const DARK_KEPPEL = '#00A18F';
export const CARIBBEAN_GREEN = '#00D3A9';
export const TEAL_BLUE = '#477E96';
export const DARK_TEAL_BLUE = '#3B687B';
export const CHARCOAL = '#3C494F';
export const BLACK = '#000000';
export const MIDNIGHT_BLACK = '#111111';
Expand Down Expand Up @@ -324,6 +325,15 @@ export const buttonDelete = {
hover: redDelete.light
};

export const darkModalGradient = {
header: `linear-gradient(90deg, ${charcoal[30]} 0%, ${accentGrey[30]} 100%)`,
fotter: `linear-gradient(90deg, ${accentGrey[30]} 0%, ${charcoal[30]} 100%)`
};

export const lightModalGradient = {
header: `linear-gradient(90deg, ${TEAL_BLUE} 0%, ${DARK_TEAL_BLUE} 100%)`,
fotter: `linear-gradient(90deg, ${DARK_TEAL_BLUE} 0%, ${TEAL_BLUE} 100%)`
};
/**
* Notification Colors
*/
Expand Down
2 changes: 1 addition & 1 deletion src/theme/palette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ export const lightModePalette: PaletteOptions = {
export const darkModePalette: PaletteOptions = {
background: {
default: Colors.charcoal[10],
secondary: Colors.accentGrey[10],
secondary: Colors.accentGrey[20],
tertiary: Colors.accentGrey[30],
hover: Colors.charcoal[20],
supplementary: Colors.accentGrey[40],
Expand Down

0 comments on commit bcb4e01

Please sign in to comment.