【发布时间】:2021-08-16 14:41:37
【问题描述】:
我尝试更改 MaterialUI 占位符颜色的占位符颜色,但没有成功。 这是我迄今为止尝试过的
const useStyles = makeStyles((theme) => ({
emailField: {
width: 265,
height: 13,
fontWeight: 'bold',
'&::placholder': { //This is meant to change the place holder color to green
color: 'green'
}
}
}));
const classes = useStyles(theme);
.....
// Here is where I am trying to apply the styled class to the input element but to
//No Success
<OutlinedInput
placeholder="name@email.com"
inputProps={{
className: classes.emailField
}}
/>
我们将不胜感激任何关于正确解决此问题的建议。 谢谢。
【问题讨论】:
-
@ShahrzadGh 不,它没有
标签: reactjs material-ui