Docs not applying base theme in manager.js
See original GitHub issueDescribe the bug Migrating to manager.js has caused Docs to not apply my theme which has a base of ‘dark’
To Reproduce Steps to reproduce the behavior:
- Create a theme in
manager.js
and set the base to ‘dark’.
Expected behavior Docs would have a base theme of ‘dark’ as in 5.2.
Screenshots Canvas:
Docs:
Code snippets
manager.js
import {addons} from '@storybook/addons';
import {create} from '@storybook/theming/create';
import {APP_COLORS as color} from '../src/styles/colors';
const theme = create({
base: 'dark',
colorPrimary: color.SW_SKY_BLUE,
colorSecondary: color.SW_SKY_BLUE,
});
addons.setConfig({
theme,
});
System: Environment Info:
System: OS: macOS 10.15.2 CPU: (8) x64 Intel® Core™ i7-7820HQ CPU @ 2.90GHz Binaries: Node: 10.16.0 - /usr/local/bin/node Yarn: 1.13.0 - ~/.yarn/bin/yarn npm: 6.13.6 - /usr/local/bin/npm Browsers: Chrome: 79.0.3945.117 Firefox: 70.0.1 Safari: 13.0.4 npmPackages: @storybook/addon-actions: ^5.3.4 => 5.3.4 @storybook/addon-centered: ^5.3.4 => 5.3.4 @storybook/addon-docs: ^5.3.4 => 5.3.4 @storybook/addon-jest: ^5.3.4 => 5.3.4 @storybook/addon-knobs: ^5.3.4 => 5.3.4 @storybook/addon-links: ^5.3.4 => 5.3.4 @storybook/addon-storysource: ^5.3.4 => 5.3.4 @storybook/addons: ^5.3.4 => 5.3.4 @storybook/react: ^5.3.4 => 5.3.4 npmGlobalPackages: @storybook/cli: 3.4.4
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:8 (7 by maintainers)
Top GitHub Comments
@palashkaria if you use
addParameters
onoptions.theme
I’d expect it to work in docs without having to do any other workarounds.I’ll open a new issue for https://github.com/storybookjs/storybook/issues/9498#issuecomment-575600598