Skip to content

Story query params in configuration - #362

Open
PSTime wants to merge 1 commit into
oblador:masterfrom
PSTime:story_query_params
Open

Story query params in configuration#362
PSTime wants to merge 1 commit into
oblador:masterfrom
PSTime:story_query_params

Conversation

@PSTime

@PSTime PSTime commented Jan 24, 2022

Copy link
Copy Markdown

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

PSTime commented Jan 24, 2022

Copy link
Copy Markdown
Author

@techeverri @oblador please take a look)

@oblador

oblador commented Feb 11, 2022

Copy link
Copy Markdown
Owner

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.

2 participants