Addon-Docs: Changing the theme via api doesn't persist in Docs
See original GitHub issueDescribe the bug I have an addon tool that handles the storybook theme through the api:
// inside my addon
api.setOptions ({
theme: themes[base],
});
The Storybook matches, but 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,
},
Expected behavior That when changing the theme through the storybook API, it trigger the Docs theme
Screenshots
System: Environment Info:
System: OS: macOS 10.15.4 CPU: (4) x64 Intel® Core™ i5-5257U CPU @ 2.70GHz Binaries: Node: 10.16.0 - /usr/local/bin/node Yarn: 1.9.4 - /usr/local/bin/yarn npm: 6.13.7 - /usr/local/bin/npm Browsers: Chrome: 81.0.4044.122 Firefox: 74.0 Safari: 13.1 npmPackages: @storybook/addon-a11y: ^5.3.18 => 5.3.18 @storybook/addon-actions: ^5.3.18 => 5.3.18 @storybook/addon-docs: ^5.3.18 => 5.3.18 @storybook/addon-knobs: ^5.3.18 => 5.3.18 @storybook/addon-storysource: ^5.3.18 => 5.3.18 @storybook/addon-viewport: ^5.3.18 => 5.3.18 @storybook/addons: ^5.3.18 => 5.3.18 @storybook/react: ^5.3.18 => 5.3.18 @storybook/storybook-deployer: ^2.8.3 => 2.8.5
Issue Analytics
- State:
- Created 3 years ago
- Reactions:13
- Comments:18 (13 by maintainers)
Top GitHub Comments
hey @shilman, are you planning to include this soon? it would be great! 🙏
Bump on this one - would love to see dynamic theming for docs!