Storybook v6 with storybook-readme

283 views Asked by At

So I have a app created with create react app with typescript. I have some components in a component folder and they have a file called .readme.md.

Now when I run storybook I se the readme part in the sidebar, but it says it can not find the readme file. If I in the storie file do a console.log on the Readme variable I import. I get the content from the readme.

My storybook/addons.js looks like this:

import 'storybook-readme/register';

Storybook dont allow me to have a config.js and a main.js. Now the storybook-readme documentations says I need to put the following code in config.js and it does not work to put in in main.js. Så where does this part go?

import { addReadme } from 'storybook-readme';
addDecorator(addReadme);
0

There are 0 answers