aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/button/button.stories.js
blob: dec084a2571f648e0c79491b3d4c380222d8bbf0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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('default', () => (
    <Button
      onClick={action('clicked')}
      type="default"
    >
      {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>
  ))
  .add('large default', () => (
    <Button
      onClick={action('clicked')}
      type="default"
      large
    >
      {text('text', 'Click me')}
    </Button>
  ))