Skip to content

Commit

Permalink
fix: adapt button colors when contained+inherit
Browse files Browse the repository at this point in the history
  • Loading branch information
jesrodri authored and felipe.richter committed Dec 6, 2022
1 parent 1fb3c8a commit fcea75f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/mui-material/src/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ const ButtonRoot = styled(ButtonBase, {
},
}),
...(ownerState.variant === 'contained' && {
backgroundColor: (theme.vars || theme).palette.grey.A100,
backgroundColor: (theme.vars || theme).palette.grey[400],
boxShadow: (theme.vars || theme).shadows[4],
// Reset on touch devices, it doesn't add specificity
'@media (hover: none)': {
boxShadow: (theme.vars || theme).shadows[2],
backgroundColor: (theme.vars || theme).palette.grey[300],
backgroundColor: (theme.vars || theme).palette.grey[400],
},
}),
...(ownerState.variant === 'contained' &&
Expand Down Expand Up @@ -186,7 +186,7 @@ const ButtonRoot = styled(ButtonBase, {
? // this is safe because grey does not change between default light/dark mode
theme.vars.palette.text.primary
: theme.palette.getContrastText?.(theme.palette.grey[300]),
backgroundColor: (theme.vars || theme).palette.grey[300],
backgroundColor: (theme.vars || theme).palette.grey[500],
boxShadow: (theme.vars || theme).shadows[2],
}),
...(ownerState.variant === 'contained' &&
Expand Down

0 comments on commit fcea75f

Please sign in to comment.