Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get all stories with Addon API #767

Closed
ZigGreen opened this issue Apr 13, 2017 · 3 comments
Closed

get all stories with Addon API #767

ZigGreen opened this issue Apr 13, 2017 · 3 comments

Comments

@ZigGreen
Copy link

Why there is no addon API to get all stories?

@usulpro
Copy link
Member

usulpro commented Apr 13, 2017

@ZigGreen
Copy link
Author

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

@usulpro
Copy link
Member

usulpro commented Apr 19, 2017

@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 ...

@shilman shilman closed this as completed Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants