-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
More controls for the theme switcher #4291
Comments
Similar to #4151 - the proposal is to
|
Yep, a slot that will allow you to hide or override the theme switcher is already in the plans for the next release since #4151 Also will make it clearer that the |
@apedroferreira would be good to be able to just pass |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @garryxiao How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Closed by #4340
The Or you can override the slot similarly to this example https://deploy-preview-4340--mui-toolpad-docs.netlify.app/toolpad/core/react-dashboard-layout/#slots and target the theme switcher style there? |
@apedroferreira Just a thought — it might be more intuitive to have a slotProps property on the DashboardLayout, similar to how it's implemented in the DataGrid. This would allow us to pass properties directly to subcomponents. For instance: <DashboardLayout
slotProps={{ themeSwitcher: { sx: { color: 'inherit' } } }}
/> What do you think? |
Yes, good idea, we could probably create a nested slot for the default theme switcher (along with adding the |
Summary
Currently, the only way to hide the switcher I found is to disable the 'light' or 'dark' mode.
const demoTheme = extendTheme({ colorSchemes: { light: true, dark: false }, colorSchemeSelector: "class", breakpoints: { values: { xs: 0, sm: 600, md: 600, lg: 1200, xl: 1536 } } });
More than that, it should support to hide it by a more straightforward way, and also provide the possiblility to create the icon in some other places, not only a static existing icon there.
Examples
No response
Motivation
No response
Search keywords: switcher
The text was updated successfully, but these errors were encountered: