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

Controls: Fail gracefully if conditional args improperly specified #18177

Closed
shilman opened this issue May 9, 2022 · 1 comment
Closed

Controls: Fail gracefully if conditional args improperly specified #18177

shilman opened this issue May 9, 2022 · 1 comment
Assignees
Milestone

Comments

@shilman
Copy link
Member

shilman commented May 9, 2022

If the user specifies a conditional control with an error, Storybook whitescreens.

For example, the following story:

export default {
  component: Button,
  argTypes: {
    backgroundColor: { control: 'color', if: {} },
  },
};

Results in:

Cursor_and_Example___Button_-_Primary_⋅_Storybook

This should fail more gracefully

@shilman
Copy link
Member Author

shilman commented May 18, 2022

w00t!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-rc.1 containing PR #18248 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant