尝试使用 Material-UI (react) 在全局级别上更改复选框的样式。
目前只有默认和悬停样式有效:
MuiCheckbox: {
colorSecondary: {
color: 'green',
'&:hover': {
color: 'blue !important',
border: '1px solid rgba(0,0,0,0.54)',
outline: '2px auto rgba(19,124,189,.6)'
}
},
}
我正在尝试做的,但不工作:
MuiCheckbox: {
colorSecondary: {
'&$focused': {
color: 'blue',
border: '1px solid rgba(0,0,0,0.54)',
outline: '2px auto rgba(19,124,189,.6)'
},
'&$focusVisible': {
color: 'blue',
border: '1px solid rgba(0,0,0,0.54)',
outline: '2px auto rgba(19,124,189,.6)'
},
}
}