📖Storybook
Setting up Storybook in your react-dsfr project.
Storybook is an open-source tool for developing and testing UI components in isolation, allowing you to create and refine components independently from the app's business logic.
For example the components website of react-dsfr is powered by Storybook. Let's see how to setup Storybook 8 in your project.
First follow the official instruction to setup Storybook in your meta framework of choice:
Then you want to add a couple of scripts that should be run before starting of building Storybook:
Next update your .gitignore:
Next add storybook-dark-mode to your dev dependencies:
Lastly apply the following reference .storybook
directory in your setup. Be sure to carefully merge the .storybook/main.ts
so you don't overwrite specific configuration required by your meta framework.
Last updated