material-ui
的{{1}}过去white by default,如果不是RaisedButton
或primary
。他们现在已将其更改为grey by default。
我想知道默认情况下将所有这些按钮设为白色最干净的方法是什么?
我想我可以简单地添加一些内联样式或类并编写CSS来实现它,但是没有办法用官方定制API来实现它吗?
答案 0 :(得分:0)
这是最干净的方法,确实使用了覆盖对象,如dan所述:
const myTheme = createMuiTheme({
// other theme stuff
overrides: {
MuiButton: {
raised: {
backgroundColor: 'white',
},
},
},
});