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

sakulstra picture sakulstra  ·  3Comments

alexanbj picture alexanbj  ·  3Comments

wahengchang picture wahengchang  ·  3Comments

levithomason picture levithomason  ·  3Comments

purplecones picture purplecones  ·  3Comments