@@ -22,6 +22,16 @@ export const Variants = () => {
22
22
)
23
23
}
24
24
25
+ export const Brand = ( ) => {
26
+ const [ value , { toggle } ] = useBoolean ( false )
27
+
28
+ return (
29
+ < Row css = { { padding : '$4' , backgroundColor : '$brand' } } >
30
+ < Switch variant = "brand" checked = { value } onCheckedChange = { toggle } />
31
+ </ Row >
32
+ )
33
+ }
34
+
25
35
export const Destructive = ( ) => {
26
36
const [ value , { toggle } ] = useBoolean ( false )
27
37
@@ -70,31 +80,54 @@ export const Disabled = () => (
70
80
71
81
export const States = ( ) => {
72
82
return (
73
- < Grid css = { { gap : '$4' , gridTemplateColumns : '$6 $6 $6' } } >
74
- < Switch variant = "primary" checked = { false } />
75
- < Switch variant = "primary" checked = { false } force = "hover" />
76
- < Switch variant = "primary" checked = { false } force = "focus" />
77
- < Switch variant = "primary" checked = { true } />
78
- < Switch variant = "primary" checked = { true } force = "hover" />
79
- < Switch variant = "primary" checked = { true } force = "focus" />
80
- < Switch variant = "secondary" checked = { false } />
81
- < Switch variant = "secondary" checked = { false } force = "hover" />
82
- < Switch variant = "secondary" checked = { false } force = "focus" />
83
- < Switch variant = "secondary" checked = { true } />
84
- < Switch variant = "secondary" checked = { true } force = "hover" />
85
- < Switch variant = "secondary" checked = { true } force = "focus" />
86
- < Switch destructive variant = "primary" checked = { false } />
87
- < Switch destructive variant = "primary" checked = { false } force = "hover" />
88
- < Switch destructive variant = "primary" checked = { false } force = "focus" />
89
- < Switch destructive variant = "primary" checked = { true } />
90
- < Switch destructive variant = "primary" checked = { true } force = "hover" />
91
- < Switch destructive variant = "primary" checked = { true } force = "focus" />
92
- < Switch destructive variant = "secondary" checked = { false } />
93
- < Switch destructive variant = "secondary" checked = { false } force = "hover" />
94
- < Switch destructive variant = "secondary" checked = { false } force = "focus" />
95
- < Switch destructive variant = "secondary" checked = { true } />
96
- < Switch destructive variant = "secondary" checked = { true } force = "hover" />
97
- < Switch destructive variant = "secondary" checked = { true } force = "focus" />
98
- </ Grid >
83
+ < >
84
+ < Grid css = { { p : '$4' , gap : '$4' , gridTemplateColumns : '$6 $6 $6' } } >
85
+ < Switch variant = "primary" checked = { false } />
86
+ < Switch variant = "primary" checked = { false } force = "hover" />
87
+ < Switch variant = "primary" checked = { false } force = "focus" />
88
+ < Switch variant = "primary" checked = { true } />
89
+ < Switch variant = "primary" checked = { true } force = "hover" />
90
+ < Switch variant = "primary" checked = { true } force = "focus" />
91
+ < Switch variant = "secondary" checked = { false } />
92
+ < Switch variant = "secondary" checked = { false } force = "hover" />
93
+ < Switch variant = "secondary" checked = { false } force = "focus" />
94
+ < Switch variant = "secondary" checked = { true } />
95
+ < Switch variant = "secondary" checked = { true } force = "hover" />
96
+ < Switch variant = "secondary" checked = { true } force = "focus" />
97
+ < Switch destructive variant = "primary" checked = { false } />
98
+ < Switch destructive variant = "primary" checked = { false } force = "hover" />
99
+ < Switch destructive variant = "primary" checked = { false } force = "focus" />
100
+ < Switch destructive variant = "primary" checked = { true } />
101
+ < Switch destructive variant = "primary" checked = { true } force = "hover" />
102
+ < Switch destructive variant = "primary" checked = { true } force = "focus" />
103
+ < Switch destructive variant = "secondary" checked = { false } />
104
+ < Switch destructive variant = "secondary" checked = { false } force = "hover" />
105
+ < Switch destructive variant = "secondary" checked = { false } force = "focus" />
106
+ < Switch destructive variant = "secondary" checked = { true } />
107
+ < Switch destructive variant = "secondary" checked = { true } force = "hover" />
108
+ < Switch destructive variant = "secondary" checked = { true } force = "focus" />
109
+ </ Grid >
110
+ < Grid
111
+ css = { {
112
+ p : '$4' ,
113
+ gap : '$4' ,
114
+ gridTemplateColumns : '$6 $6 $6' ,
115
+ backgroundColor : '$brand' ,
116
+ } }
117
+ >
118
+ < Switch variant = "brand" checked = { false } />
119
+ < Switch variant = "brand" checked = { false } force = "hover" />
120
+ < Switch variant = "brand" checked = { false } force = "focus" />
121
+ < Switch variant = "brand" checked = { true } />
122
+ < Switch variant = "brand" checked = { true } force = "hover" />
123
+ < Switch variant = "brand" checked = { true } force = "focus" />
124
+ < Switch variant = "brand" disabled checked = { false } />
125
+ < Switch variant = "brand" disabled checked = { false } force = "hover" />
126
+ < Switch variant = "brand" disabled checked = { false } force = "focus" />
127
+ < Switch variant = "brand" disabled checked = { true } />
128
+ < Switch variant = "brand" disabled checked = { true } force = "hover" />
129
+ < Switch variant = "brand" disabled checked = { true } force = "focus" />
130
+ </ Grid >
131
+ </ >
99
132
)
100
133
}
0 commit comments