forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.stories.tsx
More file actions
40 lines (39 loc) · 1.27 KB
/
index.stories.tsx
File metadata and controls
40 lines (39 loc) · 1.27 KB
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
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { text, boolean } from '@storybook/addon-knobs';
import { Button } from '.';
storiesOf('components/Button', module)
.add('Basic button with text', () => (
<Button onClick={action('onClick')}>{text('Value', 'Text')}</Button>
))
.add('Button small', () => (
<Button small={boolean('small', true)} onClick={action('onClick')}>
{text('Value', 'Text')}
</Button>
))
.add('Button block', () => (
<Button block={boolean('block', true)} onClick={action('onClick')}>
{text('Value', 'Text')}
</Button>
))
.add('Button disabled', () => (
<Button disabled={boolean('disabled', true)} onClick={action('onClick')}>
{text('Value', 'Text')}
</Button>
))
.add('Button red', () => (
<Button red={boolean('red', true)} onClick={action('onClick')}>
{text('Value', 'Text')}
</Button>
))
.add('Button secondary', () => (
<Button secondary={boolean('secondary', true)} onClick={action('onClick')}>
{text('Value', 'Text')}
</Button>
))
.add('Button danger', () => (
<Button danger={boolean('danger', true)} onClick={action('onClick')}>
{text('Value', 'Text')}
</Button>
));