forked from mihalik/react-storybook-addon-docgen
-
Notifications
You must be signed in to change notification settings - Fork 6
/
story.js
32 lines (28 loc) · 802 Bytes
/
story.js
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
import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import docs from '../src';
import Button from './Button';
import ButtonDocs from './ButtonDocs';
import ButtonSimple from './ButtonSimple';
storiesOf('ButtonDocs')
.addDecorator(docs())
.add(
'simple usage',
() => <ButtonDocs label="The Button" onClick={action('onClick')} />,
)
.add(
'another usage',
() => <ButtonDocs label="Another Button" onClick={action('another onClick')} />,
);
storiesOf('Button')
.addDecorator(docs())
.add(
'simple usage',
() => <Button label="The Button" onClick={action('onClick')} />,
);
storiesOf('ButtonSimple')
.addDecorator(docs())
.add(
'simple usage',
() => <ButtonSimple label="The Button" onClick={action('onClick')} />,
);