Skip to content
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

Is it possible to control the storybook theme base (eg light or dark) via an iframe param? #52

Open
glomotion opened this issue Jul 6, 2023 · 0 comments

Comments

@glomotion
Copy link

glomotion commented Jul 6, 2023

Is your feature request related to a problem? Please describe.
We are embedding storybook docs pages into our design system documentation website. This website currently supports 2 themes, light and dark. Storybook docs pages look quite out of place when the site's theme does not match the storybook docs page's theme.
example implementation: https://biome.immutable.com/storybook

Describe the solution you'd like
I'm hoping to be able to control the base theme used by storybook (for both docs and ui) - by passing in parameter(s) into the iframe embed URL. eg:

<iframe
  src="https://biome-storybook.immutable.com/iframe.html?id=biom3-react-statefulbuttcon--docs&viewMode=docs&shortcuts=false&uiTheme=dark&docsTheme=dark"
/>

This way, we can vary which theme we show the storybook docs in, based on the hosting application's color theme (eg light or dark).

Describe alternatives you've considered
I've tried adding params like theme=dark etc into the iframe url, with no luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant