我已经设置了主题的托盘(颜色实际上全部为#0000):
const theme = createMuiTheme({
palette: {
primary: {
main: '#0000',
light: '#0000',
dark: '#0000',
},
secondary: {
main: '#0000',
light: '#0000',
dark: '#0000',
},
info: {
main: '#0000',
light: '#0000',
dark: '#0000',
},
success: {
main: '#0000',
light: '#0000',
dark: '#0000',
},
error: {
main: '#0000',
light: '#0000',
dark: '#0000',
},
},
});
当我将按钮组件与颜色道具一起使用时,它没有使用以下样式:
<Button variant="contained">Default</Button>
<Button variant="contained" color="primary">
Primary
</Button>
<Button variant="contained" color="secondary">
Secondary
</Button>
<Button variant="contained" disabled>
Disabled
</Button>
<Button
variant="contained"
color="primary"
href="#contained-buttons"
>
Link
</Button>
为什么不使用托盘中的颜色值?当然可以覆盖按钮组件中的CSS,但这就是托盘系统的关键(如果我必须这样做)?