【问题标题】:how to make InputLabelProps focused TextField material ui如何使 InputLabelProps 聚焦 TextField 材质 ui
【发布时间】:2020-11-28 08:01:32
【问题描述】:

如何为 TextField InputLabelProps 制作这种样式

const styles = theme => ({
inputLabel: {
    '&:before': {
        color: themeStyle.textFieldUnderLineColor,
    },
    '&:after': {
        color: themeStyle.tabIndicatorProps,
    },
    '&:hover:before': {
        color: [themeStyle.appBarRDbgk, '!important'],
    },
    color: themeStyle.dialogContentColor,
},})

我是这样使用的:

<TextField InputLabelProps={classes.inputLabel}>    </TextField>

但它不起作用。

【问题讨论】:

    标签: reactjs material-ui


    【解决方案1】:

    我打赌你需要将classes.inputLabel 作为classes 属性传递给你的InputLabelProps

    <TextField InputLabelProps={{classes: {root: classes.inputLabel}}}>    </TextField>
    

    【讨论】:

      猜你喜欢
      • 2021-10-03
      • 2021-06-26
      • 2018-02-08
      • 2019-06-28
      • 1970-01-01
      • 2022-06-24
      • 2019-03-20
      • 1970-01-01
      相关资源
      最近更新 更多