Skip to content

Commit 925259a

Browse files
sookmaxsnowystingeryihuiliao
authored
add missing RAC Checkbox/CheckboxGroup story files (#6420)
Co-authored-by: Robert Snow <rsnow@adobe.com> Co-authored-by: Yihui Liao <44729383+yihuiliao@users.noreply.github.com>
1 parent 1365cdb commit 925259a

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import {Checkbox} from 'react-aria-components';
2+
import React from 'react';
3+
import './styles.css';
4+
5+
6+
export default {
7+
title: 'React Aria Components'
8+
};
9+
10+
export const CheckboxExample = () => {
11+
return (
12+
<Checkbox>
13+
<div className="checkbox">
14+
<svg viewBox="0 0 18 18" aria-hidden="true">
15+
<polyline points="1 9 7 14 15 4" />
16+
</svg>
17+
</div>
18+
Unsubscribe
19+
</Checkbox>
20+
);
21+
};
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import {Checkbox, CheckboxGroup, Label} from 'react-aria-components';
2+
import React from 'react';
3+
import './styles.css';
4+
5+
6+
export default {
7+
title: 'React Aria Components'
8+
};
9+
10+
export const CheckboxGroupExample = () => {
11+
return (
12+
<CheckboxGroup>
13+
<Label>Favorite sports</Label>
14+
<Checkbox value="soccer">
15+
<div className="checkbox" aria-hidden="true">
16+
<svg viewBox="0 0 18 18"><polyline points="1 9 7 14 15 4" /></svg>
17+
</div>
18+
Soccer
19+
</Checkbox>
20+
<Checkbox value="baseball">
21+
<div className="checkbox" aria-hidden="true">
22+
<svg viewBox="0 0 18 18"><polyline points="1 9 7 14 15 4" /></svg>
23+
</div>
24+
Baseball
25+
</Checkbox>
26+
<Checkbox value="basketball">
27+
<div className="checkbox" aria-hidden="true">
28+
<svg viewBox="0 0 18 18"><polyline points="1 9 7 14 15 4" /></svg>
29+
</div>
30+
Basketball
31+
</Checkbox>
32+
</CheckboxGroup>
33+
);
34+
};

0 commit comments

Comments
 (0)