set up custom theme for color-mode context

This commit is contained in:
maxim
2025-01-27 19:26:55 +03:00
parent 16a269bd42
commit deaf5d68bb
2 changed files with 52 additions and 7 deletions

View File

@ -0,0 +1,50 @@
import {createTheme} from '@mui/material/styles'
import {RefineThemes} from '@refinedev/mui'
const COLORS = {
primary: '#7f6b58',
secondary: '#48989f',
}
const theme = {
palette: {
primary: {
main: COLORS.primary,
},
secondary: {
main: COLORS.secondary,
},
},
components: {
MuiAppBar: {
styleOverrides: {
root: {
backgroundColor: COLORS.secondary,
},
},
},
},
}
export const CustomTheme = {
Light: createTheme({
...RefineThemes.Blue,
palette: {
...RefineThemes.Blue.palette,
...theme.palette,
},
components: {
...theme.components,
},
}),
Dark: createTheme({
...RefineThemes.BlueDark,
palette: {
...RefineThemes.BlueDark.palette,
...theme.palette,
},
components: {
...theme.components,
},
}),
}