我正在努力在Material-UI上更改字体系列。我正在尝试使用MuiTheme为整个项目设置它。如何使用Google字体中的字体来做到这一点?
答案 0 :(得分:1)
有人在另一个主题中做到了
import { createMuiTheme } from 'material-ui/styles';
import createPalette from 'material-ui/styles/palette';
import createTypography from 'material-ui/styles/typography';
const theme = createMuiTheme({
typography: createTypography(createPalette(), {
fontFamily: '"Comic Sans"',
})
});
class App extends Component {
render() {
return (
<MuiThemeProvider theme={theme}>