You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I try to use multiple Story components that are using knobs inside my docs file, only the default data of the knob from the first story is displaying
Expected behavior
Expected behavior is that even if I have multiple stories with different knobs default value I should see the components accordingly in the docs as they are displayed in canvas:
export const firstStory = () => (
<Demo content={text('content', 'This always shows')} />
);
export const secondStory = () => (
<Demo content={text('content', 'this shows only in canvas')} />
);
export const thirdStory = () => (
<Demo content={text('content', 'this shows also only in canvas')} />
);
From the code above in docs I should be able to see the same component with different content. However it is displayed with the value from the first story.
FYI, we’ve released addon-controls in Storybook 6.0. Controls are portable, auto-generated knobs that are intended to replace addon-knobs, which are slated for deprecation.
Describe the bug
When I try to use multiple
Story
components that are usingknobs
inside my docs file, only the default data of theknob
from the first story is displayingTo Reproduce
I have put up a small reproducible example that you can find here: https://github.com/justman00/next-js-storybook-docs-knobs-issue.
Expected behavior
Expected behavior is that even if I have multiple stories with different
knobs
default value I should see the components accordingly in thedocs
as they are displayed incanvas
:From the code above in docs I should be able to see the same component with different content. However it is displayed with the value from the first story.
Here is the code from the docs:
Screenshots
The text was updated successfully, but these errors were encountered: