I’m generating storybook documentation for react component. I already have a file with all versions of the prop for it.
Componet.stories.ts:
const stories: Story[] = data.map(
(data, index) =>
({
name: `Version ${index}`,
args: {
...data
}
})
);
export const story0 = stories[0];
export const story1 = stories[1];
export const story2 = stories[2];
export const story3 = stories[3];
//...
I want to export each item from an array as a separate variable in a loop. Is it even possible?