[英]How to change underline color of <Select/> by setting classes
const styles = {
inkbar: {
'&:after': {
backgroundColor: 'red',
height: '2px'
}
},
underline:{
'&:before':{
height:'2px',
backgroundColor:'green'
}
}
};
<Select
fullWidth
value={this.props.value}
onChange={this.props.onChange}
input={
<Input
classes={{
inkbar:this.props.classes.inkbar,
underline:this.props.classes.underline}}
/>
}
>
{this.props.children}
</Select>)
But when I check code with react tool, I found the classes of <Input>
component did not change. 但是当我使用react工具检查代码时,我发现<Input>
组件的类没有改变。 Does anyone know how to change the color of inkbar and underline in <Select>
component? 有谁知道如何更改墨盒的颜色和<Select>
组件中的下划线?
I use Material-ui v1.0.0-beta 我使用Material-ui v1.0.0-beta
而不是classes
使用className
,有关更多信息,请检查此链接
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.