// src/theme/create-theme.(js | ts)
export const baseTheme = {
colorSchemes: {
light: {
palette: palette.light,
shadows: shadows.light,
customShadows: customShadows.light
},
dark: {
palette: palette.dark,
shadows: shadows.dark,
customShadows: customShadows.dark
}
},
mixins,
components,
typography,
shape: { borderRadius: 8 },
direction: themeConfig.direction,
cssVariables: themeConfig.cssVariables,
defaultColorScheme: themeConfig.defaultMode
}
export function createTheme({ settingsState, themeOverrides }) {
const updatedCore = settingsState ? updateCoreWithSettings(baseTheme, settingsState) : baseTheme;
const updatedComponents = settingsState
? updateComponentsWithSettings(components, settingsState)
: {};
const theme = createMuiTheme(updatedCore, updatedComponents, themeOverrides);
return theme;
}