This is my theme config in my MUI app:
import { createTheme } from '@mui/material/styles';
declare module '@mui/material/styles' {
interface Theme {
myVariable: string;
}
interface ThemeOptions {
myVariable?: string;
}
}
export const theme = createTheme({
cssVariables: {
cssVarPrefix: 'abc',
colorSchemeSelector: 'class',
},
colorSchemes: {
dark: true,
},
});
How can I have different values for myVariable for the dark and light mode?
So in dark mode, the value might be 'a' and in light mode 'b' - the values should switch automatically when I change modes, like any other CSS variable.
I am using MUI 7.3.5.