-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Toggle Dark Mode #5841
Toggle Dark Mode #5841
Conversation
This pull request is automatically deployed with Now. |
@hipstersmoothie Love this! We're just about to ship 5.0 so this would be a 5.1 feature, but I'm game to get it integrated. |
Codecov Report
@@ Coverage Diff @@
## next #5841 +/- ##
==========================================
- Coverage 34.31% 34.27% -0.05%
==========================================
Files 648 648
Lines 9461 9473 +12
Branches 1370 1348 -22
==========================================
Hits 3247 3247
- Misses 5596 5604 +8
- Partials 618 622 +4
Continue to review full report at Codecov.
|
Awesome! That's fine with me 🚀 |
As per conversations on twitter, this works better as a plugin. I will work with @ndelangen to add more addon APIs for the menu and shortcuts. Here is the addon! https://github.com/hipstersmoothie/storybook-dark-mode |
Issue:
What I did
Added a
Toggle dark mode
button to the menu.Need to be able to set the UI back to the configured theme. Currently it sets it back to the light them
lightTheme
so it doesn't get overwrittenInitial loading UI still renders with light mode. Is there a way to set this so the use doesn't see light mode flash for a second?
@shilman @ndelangen Is this something you would include?
Follow Up PRs to include:
- configure the dark theme via settingsAdd this to the PR as well. You can configure thedarkTheme
How to test
If your answer is yes to any of these, please make sure to include it in your PR.