如何设置material-ui的卡片组件的样式,上面没有太多内容? github 页面上有 getMuiTheme,但它命名了一些可自定义的属性,但没有关于颜色的内容。
最佳答案
您可以通过像您所说的那样覆盖主题来全局更改material-ui的颜色。
const myTheme = getMuiTheme(lightBaseTheme, {
palette: {
primary1Color: "red",
primary3Color: "blue",
},
});
您提到了 Card
组件,通过 material-ui
您可以使用 style
或类似的属性覆盖特定元素的样式。例如,
<Card style={{ backgroundColor: "red" }}>
...
</Card>
关于reactjs - 如何对material-ui的卡片组件进行样式设计,上面没有太多内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47070530/