aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/button/button.stories.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-05-04 01:51:15 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-05-04 01:51:15 +0800
commitd5759cf4a8041d1a7cfd55a7d55d8b7ecb29caca (patch)
treecbaabb282c6238cded03acedc6faf779f5118c88 /ui/app/components/button/button.stories.js
parent096851d091385ee786ab1374e83aaf6a1aa7cbce (diff)
downloadtangerine-wallet-browser-d5759cf4a8041d1a7cfd55a7d55d8b7ecb29caca.tar.gz
tangerine-wallet-browser-d5759cf4a8041d1a7cfd55a7d55d8b7ecb29caca.tar.zst
tangerine-wallet-browser-d5759cf4a8041d1a7cfd55a7d55d8b7ecb29caca.zip
Add storybook integration
Diffstat (limited to 'ui/app/components/button/button.stories.js')
-rw-r--r--ui/app/components/button/button.stories.js41
1 files changed, 41 insertions, 0 deletions
diff --git a/ui/app/components/button/button.stories.js b/ui/app/components/button/button.stories.js
new file mode 100644
index 000000000..d1e14e869
--- /dev/null
+++ b/ui/app/components/button/button.stories.js
@@ -0,0 +1,41 @@
+import React from 'react'
+import { storiesOf } from '@storybook/react'
+import { action } from '@storybook/addon-actions'
+import Button from './'
+import { text } from '@storybook/addon-knobs/react'
+
+storiesOf('Button', module)
+ .add('primary', () =>
+ <Button
+ onClick={action('clicked')}
+ type="primary"
+ >
+ {text('text', 'Click me')}
+ </Button>
+ )
+ .add('secondary', () => (
+ <Button
+ onClick={action('clicked')}
+ type="secondary"
+ >
+ {text('text', 'Click me')}
+ </Button>
+ ))
+ .add('large primary', () => (
+ <Button
+ onClick={action('clicked')}
+ type="primary"
+ large
+ >
+ {text('text', 'Click me')}
+ </Button>
+ ))
+ .add('large secondary', () => (
+ <Button
+ onClick={action('clicked')}
+ type="secondary"
+ large
+ >
+ {text('text', 'Click me')}
+ </Button>
+ ))