Skip to content

Commit

Permalink
add snackbar content text color to palette
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoWilhelm committed Jun 24, 2022
1 parent 395e61c commit 482eeed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const SnackbarContentRoot = styled(Paper, {
return {
...theme.typography.body2,
color: theme.vars
? theme.vars.palette.text.primary
? theme.vars.palette.SnackbarContent.text
: theme.palette.getContrastText(backgroundColor),
backgroundColor: theme.vars ? theme.vars.palette.SnackbarContent.bg : backgroundColor,
display: 'flex',
Expand Down
2 changes: 2 additions & 0 deletions packages/mui-material/src/styles/experimental_extendTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export default function extendTheme(options = {}, ...args) {
setColor(palette.Slider, 'successTrack', lighten(palette.success.main, 0.62));
setColor(palette.Slider, 'warningTrack', lighten(palette.warning.main, 0.62));
setColor(palette.SnackbarContent, 'bg', emphasize(palette.background.default, 0.8));
setColor(palette.SnackbarContent, 'text', lightPalette.getContrastText(palette.background.default));
setColor(palette.SpeedDialAction, 'fabHoverBg', emphasize(palette.background.paper, 0.15));
setColor(palette.StepConnector, 'border', 'var(--mui-palette-grey-400)');
setColor(palette.StepContent, 'border', 'var(--mui-palette-grey-400)');
Expand Down Expand Up @@ -212,6 +213,7 @@ export default function extendTheme(options = {}, ...args) {
setColor(palette.Slider, 'successTrack', darken(palette.success.main, 0.5));
setColor(palette.Slider, 'warningTrack', darken(palette.warning.main, 0.5));
setColor(palette.SnackbarContent, 'bg', emphasize(palette.background.default, 0.98));
setColor(palette.SnackbarContent, 'text', darkPalette.getContrastText(palette.background.default));
setColor(palette.SpeedDialAction, 'fabHoverBg', emphasize(palette.background.paper, 0.15));
setColor(palette.StepConnector, 'border', 'var(--mui-palette-grey-600)');
setColor(palette.StepContent, 'border', 'var(--mui-palette-grey-600)');
Expand Down

0 comments on commit 482eeed

Please sign in to comment.