Storybook-readme: Support for storybook v6 ?

Created on 24 Aug 2020  路  3Comments  路  Source: tuchk4/storybook-readme

Doesn't works =(

import { withReadme } from 'storybook-readme';
import Component  from './Component'
import ComponentReadme from './README.md';

export default {
  title: "Component",
  component: Component,
  decorators: [withKnobs, withReadme],
  parameters: {
    readme: {
      sidebar: ComponentReadme,
    },
  }
};

Most helpful comment

@JBallin I thought it was released half-year ago...

Released it now.

All 3 comments

If you are getting the error Cannot read property 'theme' of undefined, you can fix it by providing an empty options object:

export default {
  title: "Component",
  component: Component,
  decorators: [withKnobs, withReadme],
  parameters: {
    readme: {
      sidebar: ComponentReadme,
    },
    options: {} // <-- Provide an empty options object here
  }
};

@tuchk4 @PlayMa256 can we release the fix for theme being undefined?

@JBallin I thought it was released half-year ago...

Released it now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ankurkaushal picture ankurkaushal  路  4Comments

robcaldecottvelo picture robcaldecottvelo  路  5Comments

chemoish picture chemoish  路  5Comments

kristof0425 picture kristof0425  路  9Comments

gargantuan picture gargantuan  路  5Comments