Local MUI Theme
Customize Material-UI with your theme. You can change the colors, the typography and much more.
How to use
Step 1: Set up THEME configs
// Vendors
import { createTheme } from '@material-ui/core/styles';
const defaultTheme = createTheme();
// A custom theme for this app
export const modifyTheme = {
palette: {
common: {
black: '#000',
white: '#fff',
},
primary: {
main: '#F04B32',
},
secondary: {
main: '#DADCE5',
},
error: {
main: '#F04B32',
},
background: {
default: '#fff',
},
social: {
wa: '#25D366',
ig: '#DD2A7B',
fb: '#1877F2',
tw: '#1DA1F2',
yt: '#FF0000',
},
},
typography: {
fontFamily: ['"Montserrat"', 'sans-serif'].join(','),
},
shape: {
borderRadius: 4,
},
};
const theme = createTheme({
...modifyTheme,
overrides: {
MuiCssBaseline: {
'@global': {
body: {
backgroundColor: '#F2F4F7',
},
},
},
MuiButton: {
...
},
},
});
export default theme;Step 2: Import script in the ./src/pages/_app.js
./src/pages/_app.jsStep 3: Add code ThemeProvider
ThemeProviderLast updated