Reactjs 如何制作以InputLabelProps为中心的文本字段材质ui

Reactjs 如何制作以InputLabelProps为中心的文本字段材质ui,reactjs,material-ui,Reactjs,Material Ui,如何为TextField InputLabelProps制作此样式 const styles = theme => ({ inputLabel: { '&:before': { color: themeStyle.textFieldUnderLineColor, }, '&:after': { color: themeStyle.tabIndicatorProps, }, '&:hover:be

如何为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>


但它不起作用。

我打赌您需要将
类。inputLabel
作为
道具传递给您的
InputLabelProps

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