addon-smart-knobs icon indicating copy to clipboard operation
addon-smart-knobs copied to clipboard

chore(docs): Add CSF examples

Open benmvp opened this issue 6 years ago • 3 comments

Problem

I had two problems:

  1. I was unsure if I had to install @storybook/addon-knobs with storybook-addon-smart-knobs
  2. The examples were not in Component Story Format so I wasn't sure what the equivalent CSF code looked like. Once I did, I was also unsure what order the decorators should go in.

Solution

I updated the installation instructions to include @storybook/addon-knobs for extra clarity.

The main part was adding examples for CSF. I have some set of stories that display the component multiple times in a story, so including the decorator globally messed up those stories because it was passing the same parameters into all of the components. So I added an example of adding the decorator at the story level.

Notes

I also added a fix for what I believe was a bug in the ignoreProps options example.

benmvp avatar Jan 11 '20 00:01 benmvp

This pull request is being automatically deployed with ZEIT Now (learn more). To see the status of your deployment, click on the icon next to each commit.

vercel[bot] avatar Jan 11 '20 00:01 vercel[bot]

Deployment failed with the following error:

Your `package.json` file is missing a `build` property inside the `scripts` property.

vercel[bot] avatar Jan 11 '20 00:01 vercel[bot]

Deployment failed with the following error:

Your `package.json` file is missing a `build` property inside the `scripts` property.

vercel[bot] avatar Jan 15 '20 23:01 vercel[bot]