Storybook: obtenir toutes les histoires avec l'API Addon

Créé le 13 avr. 2017  ·  3Commentaires  ·  Source: storybookjs/storybook

Pourquoi n'y a-t-il pas d'API complémentaire pour obtenir toutes les histoires ?

Commentaire le plus utile

@ZigGreen

voici un bref exemple comment l'utiliser:

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

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

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

Vous aurez un tableau avec tout votre storyKind -> histoires ...

Tous les 3 commentaires

Oui, cette API répond à mes besoins. Mais veuillez me dire comment je peux l'utiliser. N'est-ce pas une API privée ?

@ZigGreen

voici un bref exemple comment l'utiliser:

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

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

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

Vous aurez un tableau avec tout votre storyKind -> histoires ...

Cette page vous a été utile?
0 / 5 - 0 notes

Questions connexes

dnlsandiego picture dnlsandiego  ·  3Commentaires

wahengchang picture wahengchang  ·  3Commentaires

purplecones picture purplecones  ·  3Commentaires

tlrobinson picture tlrobinson  ·  3Commentaires

levithomason picture levithomason  ·  3Commentaires