【发布时间】:2021-12-05 02:24:53
【问题描述】:
下面的代码来自 MUI 5,带有 MUI 4 解决方案,用于在悬停时更改输入字段。但这显然不起作用,想知道如何在MUI 5中实现这一点,不能
似乎在悬停时从TextField 改变颜色。这是在 MUI 5 中使用 createTheme 完成的
components: {
MuiInputLabel: {
styleOverrides: {
root: {
color: arcBlue,
fontSize: '1rem',
},
},
},
MuiInput: {
styleOverrides: {
underline: {
'&:before': {
borderBottom: `2px solid ${arcBlue}`,
},
// Code from material ui 4
'&:hover:not($disabled):not($focused):not($error):before': {
borderBottom: `2px solid ${arcGrey}`,
},
},
},
},
},
【问题讨论】:
标签: reactjs material-ui jss