Storybook: get all stories with Addon API

Created on 13 Apr 2017  路  3Comments  路  Source: storybookjs/storybook

Why there is no addon API to get all stories?

Most helpful comment

@ZigGreen

here is a brief example how to use it:

import { storiesOf, getStorybook } from '@kadira/storybook';

storiesOf('React App', module)
  .add('Story 1', () => <Story1 />)
...

const myStories = getStorybook();
console.log(myStories);

You'll have an array with all you storyKind -> stories ...

All 3 comments

Yeap, this API meet my needs. But pls tell me how I can use it. Isn't it a private API?

@ZigGreen

here is a brief example how to use it:

import { storiesOf, getStorybook } from '@kadira/storybook';

storiesOf('React App', module)
  .add('Story 1', () => <Story1 />)
...

const myStories = getStorybook();
console.log(myStories);

You'll have an array with all you storyKind -> stories ...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Gongreg picture Gongreg  路  58Comments

43081j picture 43081j  路  61Comments

tycho01 picture tycho01  路  76Comments

moimikey picture moimikey  路  67Comments

ilias-t picture ilias-t  路  73Comments