小编Ben*_*der的帖子

有没有办法使用材料 ui @next React 为 Typography 中的不同属性添加不同的字体

const fontWeightMedium = 500;
const theme = createMuiTheme({
  typography: {
    // Use the system font.
    fontFamily:
    'forzaBook',
    fontWeightMedium,
    body1: {
      fontWeight: fontWeightMedium,
    },
    button: {
      fontStyle: 'italic',
    },
    caption: {
      fontWeight:100
    }
  },
  palette: {
    primary: orange,
    secondary: {
      ...grey,
      // A400: '#00e677',
    },
    contrast: 'white',
    error: red,
  }
});
Run Code Online (Sandbox Code Playgroud)

这是我目前用于更改字体和一些版式属性的内容。但我需要更改标题的字体。有谁知道如何做到这一点?

javascript fonts reactjs material-ui

1
推荐指数
1
解决办法
2175
查看次数

标签 统计

fonts ×1

javascript ×1

material-ui ×1

reactjs ×1