storybook-eol / addon-smart-knobs

🧠 This Storybook plugin uses @storybook/addon-knobs but creates the knobs automatically based on PropTypes.
https://storybooks.js.org
217 stars 36 forks source link

Fix select knob. Hide empty option if required. #66

Closed RoyalHunt closed 4 years ago

RoyalHunt commented 4 years ago

Similar to https://github.com/storybookjs/addon-smart-knobs/pull/60

Difference is in covering flow definitions. propType.required is always false for flow.

vercel[bot] commented 4 years ago

Deployment failed with the following error:

Your `package.json` file is missing a `build` property inside the `script` property.
nekitk commented 4 years ago

@RoyalHunt I checked in SmartKnobedComponentWithFlow.js example and required field is set correctly for flow. Here's an output for SmartKnobedComponent.__docgenInfo.props[prop] for each prop in the example:

ndelangen commented 4 years ago

Could you resolve conflicts and merge in the base branch?

RoyalHunt commented 4 years ago

Looks like master branch already have needed changes for correct work. I'm closing the PR. Thank you!