I\'m building a React App using Material UI.
If the button is disabled, it is grey and opaque. I\'d like it to be in my themes primary color and opaque.
So here
Neps answer is correct, but I will add more details.
First of all you should import createMuiTheme and ThemeProvider:
import { createMuiTheme } from '@material-ui/core/styles'
import { ThemeProvider } from '@material-ui/styles';
Create theme:
const theme = createMuiTheme({
palette: {
action: {
disabledBackground: 'set color of background here',
disabled: 'set color of text here'
}
}
});
And wrap your button: