-
-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add theme switcher to dashboard layout (Toolpad Core) #3674
base: master
Are you sure you want to change the base?
Add theme switcher to dashboard layout (Toolpad Core) #3674
Conversation
…out-theme-switcher
There is an issue during SSR when using the dark mode in Next.js where the server can't read which mode it's supposed to use, so the app renders in light mode until the client-side sets the correct value for the dark mode. From what I've tried/researched there's 2 possible solutions:
|
What if we do? interface AppProviderProps {
theme?: Theme | CssVarsTheme | { light: Theme, dark: Theme };
// ...
} We show the switcher when
Otherwise no theme switcher |
… avoid these better
…out-theme-switcher
All good in functionality, just missing documentation now. |
WIP