Struggling to modify the appearance of the AppBar component by utilizing the className
attribute, however, the .MuiAppBar-root
class consistently takes precedence.
const useStyles = makeStyles((theme: Theme) => ({
appBar: {
backgroundColor: 'red',
color: 'black',
zIndex: theme.zIndex.drawer + 1
},
const classes = useStyles();
...
<AppBar position='fixed' className={classes.appBar} >
https://i.sstatic.net/yqzdO.png
Observing that .makeStyles-appBar-139
is being overridden by .MuiAppBar-colorPrimary
for background-color
and color
, and by .MuiAppBar-root
for z-index
.
Attempted using classes
as well:
<AppBar position='fixed' classes={{ root: styles.appBar }} >
Yet encountered the same issue.
Edit: Employing typescript in this context.