question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Addon-Docs: Changing the theme via api doesn't persist in Docs

See original GitHub issue

Describe 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 issue

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:open
  • Created 3 years ago
  • Reactions:13
  • Comments:18 (13 by maintainers)

github_iconTop GitHub Comments

24reactions
csardinhacommented, Jun 2, 2020

hey @shilman, are you planning to include this soon? it would be great! 🙏

14reactions
igloudecommented, Nov 3, 2020

Bump on this one - would love to see dynamic theming for docs!

Read more comments on GitHub >

github_iconTop Results From Across the Web

configure storybook docs addon to display theme.dark
I'm trying to configure storybook to display a dark theme, and so far i didn't find any solution to this problem. it may...
Read more >
Changes and revisions overview | Google Drive
Blob revisions can be set to "Keep Forever" meaning the revision cannot be ... this video to learn about how to manage revisions...
Read more >
Theming - Storybook
When setting a theme, set a complete theme object. The theme is replaced, not combined. Theming docs. Storybook Docs uses the same theme...
Read more >
Addons // Statamic 3 Docs
An addon is a composer package you intend to reuse, distribute, or sell. For simple or private packages, consider implementing directly into your...
Read more >
storybook/addon-docs - npm
Storybook Docs transforms your Storybook stories into world-class component documentation. DocsPage. Out of the box, all your stories get a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found