2018-05-03 19:51:15 +02:00
|
|
|
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>
|
|
|
|
)
|
2018-05-29 23:33:29 +02:00
|
|
|
.add('secondary', () =>
|
2018-05-03 19:51:15 +02:00
|
|
|
<Button
|
|
|
|
onClick={action('clicked')}
|
|
|
|
type="secondary"
|
|
|
|
>
|
|
|
|
{text('text', 'Click me')}
|
|
|
|
</Button>
|
2018-05-29 23:33:29 +02:00
|
|
|
)
|
|
|
|
.add('default', () => (
|
|
|
|
<Button
|
|
|
|
onClick={action('clicked')}
|
|
|
|
type="default"
|
|
|
|
>
|
|
|
|
{text('text', 'Click me')}
|
|
|
|
</Button>
|
2018-05-03 19:51:15 +02:00
|
|
|
))
|
|
|
|
.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>
|
|
|
|
))
|
2018-05-29 23:33:29 +02:00
|
|
|
.add('large default', () => (
|
|
|
|
<Button
|
|
|
|
onClick={action('clicked')}
|
|
|
|
type="default"
|
|
|
|
large
|
|
|
|
>
|
|
|
|
{text('text', 'Click me')}
|
|
|
|
</Button>
|
|
|
|
))
|