Skip to content
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

Export ThemeSwitcher component #4379

Closed
SamuelLeapifai opened this issue Nov 7, 2024 · 2 comments
Closed

Export ThemeSwitcher component #4379

SamuelLeapifai opened this issue Nov 7, 2024 · 2 comments
Labels
scope: toolpad-core Abbreviated to "core"

Comments

@SamuelLeapifai
Copy link

SamuelLeapifai commented Nov 7, 2024

Summary

Hi,
you already have the ThemeSwitcher component implemented (it's used in the DashboardLayout). Would you mind exporting it similarly to how you do Account? This would be very useful for using in other places.

This would also fix this #4328 . In my case, I have implemented my own theme switcher for login page but then my switcher persists a different value then yours and I would like to sync them (otherwise one can store "light" and the other "dark"). Currently I'm unable to sync them (as far as I know).

Should be a low-hanging fruit.

Thanks.

Examples

No response

Motivation

No response

Search keywords: ThemeSwitcher, DashboardLayout

@SamuelLeapifai SamuelLeapifai added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 7, 2024
@apedroferreira
Copy link
Member

apedroferreira commented Nov 7, 2024

Hey, it was just added in #4340, so it should be released very soon! (possibly tomorrow)

For now, it will be possible to import ThemeSwitcher as a named import from @toolpad/core/DashboardLayout as shown in https://deploy-preview-4340--mui-toolpad-docs.netlify.app/toolpad/core/react-dashboard-layout/#slots.

Eventually if it's used a lot outside the DashboardLayout it might make sense to move to its own @toolpad/core/ThemeSwitcher but we will wait for #4328 on that.

@apedroferreira apedroferreira removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 7, 2024
Copy link

github-actions bot commented Nov 7, 2024

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

@SamuelLeapifai 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.

@apedroferreira apedroferreira added the scope: toolpad-core Abbreviated to "core" label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: toolpad-core Abbreviated to "core"
Projects
None yet
Development

No branches or pull requests

2 participants