Skip to content

Commit

Permalink
[Fab] Increase disabled styles precedence (#35304)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzwername committed Dec 1, 2022
1 parent 89315f1 commit 07d6b46
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/mui-material/src/Fab/Fab.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ const FabRoot = styled(ButtonBase, {
[`&.${fabClasses.focusVisible}`]: {
boxShadow: (theme.vars || theme).shadows[6],
},
[`&.${fabClasses.disabled}`]: {
color: (theme.vars || theme).palette.action.disabled,
boxShadow: (theme.vars || theme).shadows[0],
backgroundColor: (theme.vars || theme).palette.action.disabledBackground,
},
...(ownerState.size === 'small' && {
width: 40,
height: 40,
Expand Down Expand Up @@ -132,6 +127,13 @@ const FabRoot = styled(ButtonBase, {
},
}),
}),
({ theme }) => ({
[`&.${fabClasses.disabled}`]: {
color: (theme.vars || theme).palette.action.disabled,
boxShadow: (theme.vars || theme).shadows[0],
backgroundColor: (theme.vars || theme).palette.action.disabledBackground,
},
}),
);

const Fab = React.forwardRef(function Fab(inProps, ref) {
Expand Down

0 comments on commit 07d6b46

Please sign in to comment.