We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 827e63d + e00f347 commit b895bcbCopy full SHA for b895bcb
src/theme/theme.ts
@@ -7,13 +7,17 @@ export const drawerWidth = 240;
7
8
export const createCustomTheme = (mode: PaletteMode, brandPalette?: Interactiveness) => {
9
const basePalette = mode == 'light' ? lightModePalette : darkModePalette;
10
- const themePalette = brandPalette
11
- ? Object.assign({}, basePalette, {
12
- background: {
13
- brand: brandPalette
14
- }
15
- })
16
- : basePalette;
+
+ const themePalette = {
+ ...basePalette,
+ background: {
+ ...(basePalette.background || {}),
+ brand: {
+ ...((basePalette?.background?.brand || {}) as Interactiveness),
17
+ ...(brandPalette || {})
18
+ }
19
20
+ };
21
22
return createTheme({
23
palette: {
0 commit comments