I am trying to overwrite default MUI 5 Button styles with custom styles (using either withStyles
or through a className
(defined using makeStyles
), but the default styles are always on top of the custom ones. The issue with withStyles
was resolved by adding those styles to the global style overrides when defining the theme, but the className-based ones are problematic.
How do I resolve that? Below are some screenshots of the weird behavior.
^ A screenshot of the styles of the button in question. (Some default styles were removed to fit in one screenshot). You can see the default styles overwriting the paddings set by the custom styles.