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

Add storybook parameters #334

Open
joshferrell opened this issue Nov 7, 2023 · 0 comments
Open

Add storybook parameters #334

joshferrell opened this issue Nov 7, 2023 · 0 comments

Comments

@joshferrell
Copy link

Mode

Storybook

Feature description

In my storybook, I have globals like light and dark theme. I'd like to be able to run tests on both of these modes.

import type { CustomProjectConfig } from 'lost-pixel'

export const config: CustomProjectConfig = {
  storybookShots: {
    storybookUrl: './storybook-static',
    globals: {
       color: ['light', 'dark'],
       brands: ['acme', 'diffbrand']
    }
  },
  generateOnly: true,
}

Ideally these would run tests with the query param: &globals=color:dark;brand:acme but with an enumeration of each type. It'd be really cool if we could tie into psuedo parameters to say this story will run for acme and diffbrand, but the rest only run for a single brand.

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