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
Storybook addons "storysource" and "docs" not loading the story source imported from other files. In the example shown below, storybook preview and docs story panel renders the component, but storysource addon panel is not loading the source. Just shows "loading source..." and docs page shows "no code available".
My example seems very simple to be included in the main story file. But in reality, each of my example may have some more logic/code. I'd like to put them in separate files and import it in the main story.
Is this possible?
For example, my story is "MyComponent.stories.jsx".
import React from "react";
import MyComponent from "mycomponent";
import SimpleComponent from "./Simple";
import AdvancedComponent from "./Advanced";
export default {
title: "Components",
component: MyComponent
};
export {
SimpleComponent,
AdvancedComponent
}
Simple.jsx
import React from 'react';
export default () => <MyComponent {...props}/>;
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!
Storybook addons "storysource" and "docs" not loading the story source imported from other files. In the example shown below, storybook preview and docs story panel renders the component, but storysource addon panel is not loading the source. Just shows "loading source..." and docs page shows "no code available".
My example seems very simple to be included in the main story file. But in reality, each of my example may have some more logic/code. I'd like to put them in separate files and import it in the main story.
Is this possible?
For example, my story is "MyComponent.stories.jsx".
Simple.jsx
Advanced.jsx
The text was updated successfully, but these errors were encountered: