#SB6.5 Creating stories dynamically in CSF (e.g. according to enumerable)

1 messages · Page 1 of 1 (latest)

hardy flint
#

Hi all! I'm using Storybook (6.5) for the first time to integrate it in an Angular Component Library. I'm struggling to find a proper solution to generate stories dynamically (for example according to an enumerable where I have 'statuses' with information like status_name: status_css_class. As stories are named exports, I can't find a way to create them iterating over the enum (via Object.keys). If I've understood well, in the past this could be done using storiesOf(). But what would be the proper way to do that in CSF format?
I've been reading al the Storybook site documentation and I can't find anything related.
Thank you very much in advance, folks!

thorny tusk