Skip to content

Commit

Permalink
Merge pull request #659 from codeSafari10/formatting
Browse files Browse the repository at this point in the history
Formatting
  • Loading branch information
aabidsofi19 authored Jun 24, 2024
2 parents 00413b4 + a246b6d commit 42ef57c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/theme/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ export const drawerWidth = 240;

export const createCustomTheme = (mode: PaletteMode, brandPalette?: Interactiveness) => {
const basePalette = mode == 'light' ? lightModePalette : darkModePalette;
const themePalette = brandPalette
? Object.assign({}, basePalette, {
background: {
brand: brandPalette
}
})
: basePalette;
const themePalette = structuredClone(basePalette);

if (brandPalette && themePalette.background) {
themePalette.background.brand = brandPalette;
}
return createTheme({
palette: {
mode,
Expand Down

0 comments on commit 42ef57c

Please sign in to comment.