I've been trying to customize the default typography that comes with material UI 5 beta, but it wouldn't work.
import {createTheme, responsiveFontSizes} from "@material-ui/core/styles";
import {ThemeProvider} from "@material-ui/styles";
import {Typography} from "@material-ui/core";
let theme = (createTheme({
typography: {
fontFamily: "Poppins",
h1: {
color: "#fff",
fontWeight: 900,
fontSize: '48px',
lineHeight: 1.1,
},
}))
theme = responsiveFontSizes(theme)
return (
<ThemeProvider theme={theme}>
<StyledEngineProvider injectFirst>
<Typography variant='h1'> Hello there! </Typography>
</StyledEngineProvider>
</ThemeProvider>
The result displayed still has the default h1 styling and the font family doesn't work also after importing the font in the index.css file.