April 2020
Intermediate to advanced
716 pages
18h 55m
English
The Material-UI theme can be easily customized using the ThemeProvider component. It can also be used to configure the custom values of theme variables in createMuiTheme(). We will define a custom theme for the skeleton application in client/theme.js using createMuiTheme, and then export it so that it can be used in the App component.
mern-skeleton/client/theme.js:
import { createMuiTheme } from '@material-ui/core/styles'import { pink } from '@material-ui/core/colors'const theme = createMuiTheme({ typography: { useNextVariants: true, }, palette: { primary: { light: '#5c67a3', main: '#3f4771', dark: '#2e355b', contrastText: '#fff', }, secondary: { light: '#ff79b0', main: '#ff4081', dark: '#c60055', contrastText: ...Read now
Unlock full access