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

Story query params in configuration #362

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PSTime
Copy link

@PSTime PSTime commented Jan 24, 2022

This feature allows you to configure stories more deeply. For example, we can support themes (https://storybook.js.org/addons/storybook-addon-themes). You just need to pass query param into configuration.
Example:
"chrome.docker.dark": { "target": "chrome.docker", "width": 1980, "height": 1000, "looks-same": { "ignoreCaret": true }, "storyQueryParams": {"theme": "dark"} },

And then implement a simple script in .storybook/preview-head.html to convert query params to HTML tag class.

@PSTime
Copy link
Author

PSTime commented Jan 24, 2022

@techeverri @oblador please take a look)

@oblador
Copy link
Owner

oblador commented Feb 11, 2022

Would it make more sense to just enable forcing dark mode instead? Should be doable with setAutoDarkModeOverride.

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

Successfully merging this pull request may close these issues.

None yet

2 participants