![](/img/trans.png)
[英]How to change the underline and label color of Material-UI <Select/>
[英]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>)
但是當我使用react工具檢查代碼時,我發現<Input>
組件的類沒有改變。 有誰知道如何更改墨盒的顏色和<Select>
組件中的下划線?
我使用Material-ui v1.0.0-beta
而不是classes
使用className
,有關更多信息,請檢查此鏈接
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.