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

It's necessary add both decorators?

Open renatorib opened this issue 8 years ago • 2 comments

Since withSmartKnobs encapsulates withKnobs here: https://github.com/lucasconstantino/storybook-addon-smart-knobs/blob/master/src/index.js#L65

The usage of withKnobs decorator in readme example is unnecessary duplicate, right?

storiesOf('Button')
  .addDecorator(withSmartKnobs)
  .addDecorator(withKnobs) // <--------------- this
  .add('simple', () => <Button>Smart knobed button</Button>)

renatorib avatar Jan 10 '17 19:01 renatorib

Works for me without withKnobs (using globally added decorators.)

tko avatar Mar 20 '17 20:03 tko

From #8 (npm v0.2.3) on you will need to add both decorators. Sorry if this breaks your usage, just add decorator in manually and it should work. I forgot to tell the author that it can be a breaking change for some people.

Gongreg avatar Mar 29 '17 06:03 Gongreg