Skip to content

Instantly share code, notes, and snippets.

@bran-deb
Created April 19, 2022 15:24
Show Gist options
  • Select an option

  • Save bran-deb/cfd166a0d757b890a9a8c384c6cbcc48 to your computer and use it in GitHub Desktop.

Select an option

Save bran-deb/cfd166a0d757b890a9a8c384c6cbcc48 to your computer and use it in GitHub Desktop.
themes-material-ui
import { createTheme } from '@mui/material';
import { green, grey, purple, red } from '@mui/material/colors';
export const customTheme = createTheme({
palette: {
mode: 'light',
background: {
default: grey[300]
},
primary: {
main: red[900]
},
secondary: {
main: green[500]
},
error: {
main: red.A400
},
},
components: {
MuiAppBar: {
defaultProps: {
elevation: 0
},
styleOverrides: {}
}
}
});
import { createTheme } from '@mui/material';
import { red } from '@mui/material/colors';
export const darkTheme = createTheme({
palette: {
mode: 'dark',
secondary: {
main: '#19857b'
},
error: {
main: red.A400
},
},
components: {
MuiAppBar: {
defaultProps: {
elevation: 0
},
styleOverrides: {
root: {
backgroundColor: '#4a148c'
}
}
}
}
});
import { createTheme } from '@mui/material';
import { grey, red } from '@mui/material/colors';
export const lightTheme = createTheme({
palette: {
mode: 'light',
background: {
default: grey[300]
},
primary: {
main: '#4a148c'
},
secondary: {
main: '#19857b'
},
error: {
main: red.A400
},
},
components: {
MuiAppBar: {
defaultProps: {
elevation: 0
},
styleOverrides: {}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment