Open mboudriga opened 5 years ago
I'm having the same issue. If you configure Storybook to use its built in dark theme, the docs tab is styled with the dark theme:
When the storybook-dark-mode
addon is enabled and configured, the docs tab does not use the dark theme when you switch to dark mode:
The toggle for switching between light/dark mode also disappears when you change to the docs tab.
I might not get a chance to look at this for awhile. Prs very appreciated
On Wed, Nov 20, 2019 at 1:33 PM Chris Guerrero notifications@github.com wrote:
I'm having the same issue. If you configure Storybook to use its built in dark theme https://storybook.js.org/docs/configurations/theming/#global-theming, the docs tab is styled with the dark theme:
[image: dark_mode_default] https://user-images.githubusercontent.com/3720304/69279944-3927cc00-0b9a-11ea-849c-00b31c61357c.png
When the storybook-dark-mode addon is enabled and configured, the docs tab does not use the dark theme when you switch to dark mode:
[image: dark_mode_with_addon] https://user-images.githubusercontent.com/3720304/69279957-3f1dad00-0b9a-11ea-8bb3-9bbd377f1277.png
The toggle for switching between light/dark mode also disappears when you change to the docs tab.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hipstersmoothie/storybook-dark-mode/issues/70?email_source=notifications&email_token=AAJDEBGNQLKBUGOXV2J35ZLQUWULPA5CNFSM4JOUUKVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEVGKDQ#issuecomment-556426510, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJDEBDNPSV33GPTVKLZHL3QUWULPANCNFSM4JOUUKVA .
Same issue here, but with the Notes tab, instead of the Docs tab
I am having the same issue here. When in the docs tab the dark mode toggle disappears as well. Any movement here.
I will still merge any PR that fixes the issue 🚀
It seams to be a issue with the Docs Addon.
I created a custom addon that does something like this one, manipulating the Storybook theme through the api:
// inside my addon
api.setOptions ({
theme: themes[base],
});
Only Storybook matches, Docs don't change.
Docs works with the dark theme just by adding through addParametes
:
// config.js
import { themes } from '@storybook/theming';
addParameters({
options: {
theme: themes.dark,
},
I opened an issue on the Storybook and got a response:
In 6.0 we've moved to a parallel theming structure for docs:
https://github.com/storybookjs/storybook/blob/next/addons/docs/docs/theming.md#storybook-theming
That should be simple to implement I think
PRs welcome! I'll probably wait until 6.0 to make that change myself, but I'm open to someone else doing it
Docs will have separate theming in 6.0, might fix this problem? https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#docs-theme-separated
It isn’t dynamic yet https://github.com/storybookjs/storybook/issues/10523
I know it's been a while, but does it still mean that the Docs panel/addon cannot be made to switch from dark to light dynamically like the rest of the UI? Thanks.
In my case I use this plugin's dark/light class to add my own dark mode overrides to the docs tab. no official support yet
When using the storybook docs addon, the theme will snap back to the default theme. So if you select dark mode then click on the docs tab, the theme will snap to light and its jarring.