Storybook Addon Info
An addon to Storybook that allows for display of Markdown files.
In building out component libraries, there may arise a need to display functional requirements for each component. This addon will allow you to pass in a Markdown file and display it within the the addons area/.
npm i -D storybook-addon-info
Then, add following content to
.storybook/config.js file, import the
Now, you can use the
info parameter to add a note to each story. This parameter accepts a raw version of a Markdown file.
raw-loader is installed with this package in order to load the file contents as a string.
Note: Using a
!!before a request will disable all loaders specified in the configuration. This will allow for the contents to be passed as a string.
import info from '!!raw-loader!./README.md';;