Trying to change the cursor and startIcon when a button is disabled, in the theme to prevent from repeating for each button, but can not find the solution.
&:hover is not taking into account, and can not find the startIcon property in override.
Any help would be appreciated. Running MUI V5.0.6
const theme = createTheme({
palette: {
primary: {
main: white,
},
secondary: {
main: "#19857b",
},
error: {
main: red.A400,
},
},
components: {
MuiButton: {
styleOverrides: {
root: {
backgroundColor: blue[200],
"&.Mui-disabled": {
backgroundColor: "#ef9a9a",
},
"&:hover": {
backgroundColor: blue[400],
},
"&.Mui-disabled:hover": {
cursor: "not-allowed", <-- has no effect, the cursor is still a pointer
startIcon <-- property doesn't exists
},
},
},
},
},
});