Some say you should use the jsx-global-plugin like “@global body{fontFamily:’someFont’}” , but it doesn’t work in my project. The global CSS still has the lower CSS speciality than MUI components’ CSS because this global CSS is using a type selector.
You should use a theme instead
//create a theme
const myTheme = createMuiTheme({
typography: {
fontFamily: "Roboto Condensed"
}
}
// use the theme
class MyComponent extends React.Component<Props> {
...
render() {
return (
<MuiThemeProvider theme={this.props.theme}>
<CssBaseline/>
<p>Some content</p>
</MuiThemeProvider>
);
}
}