I can't seem to find a way to override the following rule on an InputBase
:
.MuiInputBase-root.Mui-disabled {
color: rgba(0, 0, 0, 0.38);
}
The rule I want to apply is: color: "rgba(0, 0, 0, 0.75)"
I've tried using classname and classes but nothing is working. Any ideas?
textField: {
marginLeft: theme.spacing(1),
marginRight: theme.spacing(1),
'&:disabled': {
color: "rgba(0, 0, 0, 0.75)"
}
},
disabled: {
color: "rgba(0, 0, 0, 0.75)",
'&:disabled': {
color: "rgba(0, 0, 0, 0.75)"
}
}
<TextField
disabled
id="outlined-disabled"
label="Disabled"
defaultValue="Hello World"
className={classes.textField}
classes={{
root: classes.disabled,
disabled: classes.disabled
}}
margin="normal"
variant="outlined"
/>
Codesandbox: https://codesandbox.io/s/material-demo-3xb7n
InputProps
already but it didn't work, I must have done something wrong. – Niu