更新时间:2022-12-16 22:46:38
您可以使用两个选项
1.用类覆盖
使用input
道具创建<Input />
元素,并使用underline
键使用类重写.
Create a <Input />
element using input
Props and override using classes using underline
key.
<Select
value={this.state.age}
onChange={this.handleChange}
input={<Input classes={{
underline: classes.underline,
}}
name="age" id="age-helper" />}>
我在您的沙箱中应用了此内容,并在此处
I applied this in your sandbox and take a look at this here
2.使用MuiThemeProvider
2. Using MuiThemeProvider
const theme = createMuiTheme({
palette: {
primary: green,
},
});
并使用<MuiThemeProvider/>
我在此沙箱中都应用了