Skip to content

Commit

Permalink
[Button] Fix regression for color inherit (#43862)
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp authored Sep 23, 2024
1 parent baffb12 commit ea9e6af
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/mui-material/src/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,8 @@ const ButtonRoot = styled(ButtonBase, {
color: 'inherit',
},
style: {
'--variant-containedColor': theme.vars
? // this is safe because grey does not change between default light/dark mode
theme.vars.palette.text.primary
: theme.palette.getContrastText?.(inheritContainedBackgroundColor),
color: 'inherit',
borderColor: 'currentColor',
'--variant-containedBg': theme.vars
? theme.vars.palette.Button.inheritContainedBg
: inheritContainedBackgroundColor,
Expand Down

0 comments on commit ea9e6af

Please sign in to comment.