Skip to content

Comments

Story query params in configuration#362

Open
PSTime wants to merge 1 commit intooblador:masterfrom
PSTime:story_query_params
Open

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

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.

2 participants