javascript - 使用 createMuiTheme 更改 Material UI 的 H1
问题描述
我在使用材料 UI 创建自定义主题后,但不能像我想要的那样针对主题的各个部分:
const theme = createMuiTheme({
palette: {
primary: {
main: '#556cd6',
fontFamily: '"Indie Flower", handwriting',
},
secondary: {
main: '#19857b',
},
error: {
main: red.A400,
},
background: {
default: '#fff',
},
},
typography: {
// Use the system font instead of the default Roboto font.
h1: {
fontFamily: '"Indie Flower", handwriting',
},
},
})
您是否可以更改默认字体h1,h2,input,p
等内容?
解决方案
推荐阅读
- javascript - 基于重复字典属性将一维列表减少为锯齿状二维列表
- reactjs - 在我重新安装应用程序之前,React Native + Redux 新的减速器不存在
- java - JavaFX - 这是显示列表的哪种类型的视图?
- angular - 为什么 Angular 在重置 url 参数时会创建 2 个单独的变量空间?
- google-cloud-platform - Google Cloud Apache Beam WritetoBigQuery 抛出错误并且速度非常慢
- python - 我在最新版本的python中不断收到同样的错误
- ruby - 如何找到返回收益的确切代码行?
- azure-ad-b2c - 如何在 B2C 注册页面中分别为“条款或使用”和“隐私政策”应用两个复选框(使用自定义政策)
- android - LazyColumn reverseLayout 不随对讲滚动
- amazon-web-services - 如何将参数传递给不同的 AWS SAM 文件