summaryrefslogtreecommitdiff
path: root/stories/index.stories.js
diff options
context:
space:
mode:
authorNick Van Doorn <vandoorn.nick@gmail.com>2019-03-29 00:35:56 -0700
committerNick Van Doorn <vandoorn.nick@gmail.com>2019-03-29 00:35:56 -0700
commit65220cc8db0d7c63f49627526466d54969958fe1 (patch)
treee2989cb16576f177e60f75f9a733487adfd868f5 /stories/index.stories.js
parent51687fe7a2de2d4ed2800af46f9b6a9ac6c929ee (diff)
Init commit
Diffstat (limited to 'stories/index.stories.js')
-rw-r--r--stories/index.stories.js31
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>
+ ))