-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
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
Stories imported in MDX ignore args and parameters #11412
Comments
Thanks @jonhuteau ! Will try to give it a look this weekend |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Yo-ho-ho!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-rc.21 containing PR #11752 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
Describe the bug
I'm upgrading my Storybook from 6.0.0-beta.37 to 6.0.0-beta.39.
As mentioned in release notes, multiple files with same title aren't allowed anymore. So I'm trying to merge theses files.
To give you some context, here are my files:
chart.stories.js
, which defines a component playground and only available instory
modechart.stories.mdx
which exposes component showcase with some pre-made options/customizations + props tablechart.stories.js
chart.stories.mdx
I'm able to see each stories defined in MDX file but I need to define
parameters
andargs
arguments on Story tagAnother point I'd like to report is that before, when multiple files where allowed, I didn't had "Playground" story in
Docs
tab. Now I'm seeing this story while it's defined as "story only" modeTo Reproduce
Steps to reproduce the behavior:
stories.js
file and 1stories.mdx
fileimport * as stories from './foo.stories.js';
Expected behavior
If I define
args
/parameters
in JS story file, I want SB to take these values without having to setargs
/parameters
properties on<Story>
tagSystem:
Additional context
I tried to add a primary file responsible of exporting stories with this content
It throws me an
Unexpected default export without title: {"includeStories":["basic","complex"],"parameters":{"docs":{}}}
.So I guess it's because my files are beeing loaded with
*.stories.@(js|mdx)
.If I rename to something like
chart.(js|mdx)
, only JS file is loadedThe text was updated successfully, but these errors were encountered: