Skip to content

Instantly share code, notes, and snippets.

@jpggvilaca
Created September 10, 2018 14:52
Show Gist options
  • Save jpggvilaca/35e0cac5e39636316a8779000a20bec9 to your computer and use it in GitHub Desktop.
Save jpggvilaca/35e0cac5e39636316a8779000a20bec9 to your computer and use it in GitHub Desktop.
storybook stories
// Box.js
const Box = () => <div>Box</div>;
// SomeOtherComp.js
const SomeOtherComp = () => <div>Some other comp</div>;
// index.stories.js
import Box from './Box';
import SomeOtherComp from './SomeOtherComp';
storiesOf('Box', module).add(
'default',
withInfo('Basic usage of the Text text')(() => <Box>Box</Box>)
);
storiesOf('SomeOtherComp', module).add(
'default',
withInfo('Basic usage of the Text text')(() => <SomeOtherComp>Text</SomeOtherComp>)
);
// ...other stories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment