File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed
packages/react-aria-components/stories Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change
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
+ } ;
Original file line number Diff line number Diff line change
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
+ } ;
You can’t perform that action at this time.
0 commit comments