-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathstory.js
51 lines (49 loc) · 1.04 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { html } from 'lit';
import { args, argTypes } from './story.args';
import changelog from './CHANGELOG.md';
import readme from './README.md';
import './index';
export default {
title: 'Components/Checkbox',
parameters: {
readme,
usage: {
propsPureHTML: `label="I'm a checkbox"`,
propsReact: `onChange={() => alert("you interacted with me")} label="I'm a checkbox" defaultChecked`,
},
changelog,
},
args,
argTypes,
};
export const Checkbox = ({
refId,
label,
name,
variant,
checked,
disabled,
error,
required,
styled,
}) =>
html`
<div
style="${variant && variant.includes('inverted')
? `background-color: #027180; padding: 10px;`
: ''}"
>
<axa-checkbox
refId="${refId}"
class="hover"
name="${name}"
variant="${variant}"
label="${label}"
?disabled="${disabled}"
?checked="${checked}"
?required="${required}"
?styled="${styled}"
error="${error}"
></axa-checkbox>
</div>
`;