-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Setting inlineStories to false causes the documentation code snippet to be generated incorrectly #13139
Comments
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! |
+1 |
Experienced this issue today as well. I was using My code snippet: const styles = {
transform: "scale(1)",
height: "100vh",
};
export default {
title: "Components/Molecules/DashboardContainer",
component: DashboardContainer,
parameters: {
componentSubtitle: "Container for the different dashboard pages",
docs: {
// page: DashboardContainerMdx,
source: {
type: "dynamic",
excludeDecorators: true,
},
},
},
decorators: [(storyFn) => <div style={styles}>{storyFn()}</div>],
} as Meta; |
The problem still exists. https://stackblitz.com/edit/github-jad43t?file=src%2Fstories%2FButton.stories.ts One workaround I've found is to set the |
+1 |
Describe the bug
Setting
{ docs: { inlineStories: false } }
is causing the code snippet on the component DocsPage to be generated incorrectly. Additionally, if I change anything regarding what the story renders (such as parameters, the shape of the rendered output, etc.), it generates correctly until I refresh the page, click on another component and return to this one, or restart Storybook. If I don't setinlineStories
tofalse
, it generates correctly.To Reproduce
Steps to reproduce the behavior:
inlineStories
parameter tofalse
.Expected behavior
I expect the component snippet to just contain the component and the parameters passed in; instead, it's rendering the function definition for the story.
Screenshots
This is what I expect the output to be (this screenshot is taken when not setting
inlineStories
to false:This is what is generated when
inlineStories
is false:Code snippets
System
The text was updated successfully, but these errors were encountered: