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
30 lines (28 loc) · 734 Bytes
/
index.stories.tsx
File metadata and controls
30 lines (28 loc) · 734 Bytes
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
/* eslint-disable jsx-a11y/label-has-associated-control */
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { Checkbox } from '.';
const stories = storiesOf('components/Checkbox', module);
stories
.add('Basic Checkbox', () => (
<>
<Checkbox
onClick={action('onClick')}
onChange={action('onChange')}
id="hello"
/>
<label htmlFor="checkbox">Hello</label>
</>
))
.add('Checked Checkbox', () => (
<>
<Checkbox
onClick={action('onClick')}
onChange={action('onChange')}
id="hello"
checked
/>
<label htmlFor="checkbox">Hello</label>
</>
));