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
Hi guys,
I need to get all stories from storybook, I tried like the bellow code but didn't load stories in CSF format. There is a way to get all stories of a folder using React storybook?
import{configure,getStorybook}from'@storybook/react';constreq=require.context('./',true,/\.stories\.tsx$/);functionloadStories(){req.keys().forEach((filename)=>req(filename));}configure(loadStories,module);// Returns only stories that uses storiesOf from '@storybook/react'.conststoriesList=getStorybook();
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi guys,
I need to get all stories from storybook, I tried like the bellow code but didn't load stories in CSF format. There is a way to get all stories of a folder using React storybook?
PS.: There is a issue about the getStorybook method but doesn't have an answer/example
Beta Was this translation helpful? Give feedback.
All reactions