diff options
Diffstat (limited to 'stories/index.stories.js')
-rw-r--r-- | stories/index.stories.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/stories/index.stories.js b/stories/index.stories.js new file mode 100644 index 0000000..70d60b5 --- /dev/null +++ b/stories/index.stories.js @@ -0,0 +1,31 @@ +import React from 'react' + +import { storiesOf } from '@storybook/react' +import { action } from '@storybook/addon-actions' +import { linkTo } from '@storybook/addon-links' + +import { Button, Welcome } from '@storybook/react/demo' + +import { DemoComponent } from '../src/demo-component' + +storiesOf('DemoComponent', module).add('to Storybook', () => ( + <DemoComponent> + <h1 style={{ fontSize: '4em' }}>Hello world</h1> + </DemoComponent> +)) + +storiesOf('Welcome', module).add('to Storybook', () => ( + <Welcome showApp={linkTo('Button')} /> +)) + +storiesOf('Button', module) + .add('with text', () => ( + <Button onClick={action('clicked')}>Hello Button</Button> + )) + .add('with some emoji', () => ( + <Button onClick={action('clicked')}> + <span role="img" aria-label="so cool"> + 😀 😎 👍 💯 + </span> + </Button> + )) |