We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Prior to version 6.3 of Storybook, when I create a decorator, I'm able to pass props into it like so
export const withFoobar = (Story, context) => ( <Story foobar="foo" {...context} /> );
And then I expect to be able to access the props from any story:
const Template = (args, { foobar }) => { return ( <div> <Button {...args} /> <p> This value should say 'foo': <code>{foobar}</code> </p> </div> ); };
However, as of 6.3, the props I pass in via the decorator are now undefined.
undefined
To Reproduce
https://github.com/JoshTumath/storybook-decorator-props-bug-repro
https://joshtumath.github.io/storybook-decorator-props-bug-repro/?path=/story/example-button--primary&globals=measureEnabled:false
System
Environment Info: System: OS: macOS 11.4 CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz Binaries: Node: 14.15.5 - ~/.nvm/versions/node/v14.15.5/bin/node Yarn: 2.4.2 - /usr/local/bin/yarn npm: 6.14.11 - ~/.nvm/versions/node/v14.15.5/bin/npm Browsers: Chrome: 91.0.4472.114 Safari: 14.1.1 npmPackages: @storybook/addon-actions: ^6.4.0-alpha.4 => 6.4.0-alpha.4 @storybook/addon-docs: ^6.4.0-alpha.4 => 6.4.0-alpha.4 @storybook/addon-essentials: ^6.4.0-alpha.4 => 6.4.0-alpha.4 @storybook/addon-links: ^6.4.0-alpha.4 => 6.4.0-alpha.4 @storybook/react: ^6.4.0-alpha.4 => 6.4.0-alpha.4
Additional context None
The text was updated successfully, but these errors were encountered:
Thanks @JoshTumath. I can confirm this is a regression from 6.2.9 which was introduced in 6.3.0-alpha.15, presumably in this PR: #14692
6.2.9
6.3.0-alpha.15
Sorry, something went wrong.
Add a reproducing story for #15400
8e373ab
👋 thanks for the repro @JoshTumath
Gadzooks!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.0-alpha.6 containing PR #15408 that references this issue. Upgrade today to the @next NPM tag to try it out!
@next
npx sb upgrade --prerelease
Closing this issue. Please re-open if you think there's still more to do.
Thank you for fixing! Does the 'patch' label on the PR mean the fix also be released in v6.3.2?
@JoshTumath Yes, will release in 6.3.x later this week or first thing next
Boo-yah!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.3.2 containing PR #15408 that references this issue. Upgrade today to the @latest NPM tag to try it out!
@latest
npx sb upgrade
tmeasday
No branches or pull requests
Describe the bug
Prior to version 6.3 of Storybook, when I create a decorator, I'm able to pass props into it like so
And then I expect to be able to access the props from any story:
However, as of 6.3, the props I pass in via the decorator are now
undefined
.To Reproduce
https://github.com/JoshTumath/storybook-decorator-props-bug-repro
https://joshtumath.github.io/storybook-decorator-props-bug-repro/?path=/story/example-button--primary&globals=measureEnabled:false
System
Additional context
None
The text was updated successfully, but these errors were encountered: