33minver: 0.24.0
44also:
55 elements/hx-switch: < hx-switch >
6+ elements/hx-switch-control> : < hx-switch-control >
67---
78 {% extends 'component.njk' %}
89
1516 {% endblock %}
1617
1718 {% block content %}
19+
20+ <!-- start of demo no label example section for switch -->
21+
22+ < section >
23+ < header >
24+ < h2 id ="default-switch "> Default Switch (no labels)</ h2 >
25+ </ header >
26+
27+ < div class ="example " id ="vue-switchNoneDemo " v-cloak >
28+ < div >
29+ < hx-switch-control >
30+ < input type ="checkbox " id ="switchNoneTest " />
31+ < label for ="switchNoneTest ">
32+ < hx-switch aria-labelledby ="switchNoneTest ">
33+ </ hx-switch >
34+ </ label >
35+ </ hx-switch-control >
36+ </ div >
37+
38+ < footer >
39+ < pre > < code v-text ="snippet "> </ code > </ pre >
40+ </ footer >
41+ </ div >
42+
43+ </ section >
44+
45+ <!-- end of demo no label example section for switch -->
46+
47+ <!-- start of demo on/off label example section for switch -->
48+
1849 < section >
1950 < header >
20- < h2 id ="basic-checkbox "> Switch</ h2 >
21- < p > </ p >
51+ < h2 id ="on-switch "> Switch with < b > < i > on/off</ i > </ b > labels</ h2 >
2252 </ header >
53+ < p class ="hxSubdued hxSubBody ">
54+ < hx-icon type ="exclamation-triangle "> </ hx-icon >
55+ The label can be overridden to provide a different label (for i18n support).
56+ The character width is limited to 2-3 characters.
57+ </ p >
58+ < div class ="example " id ="vue-switchOnOffDemo " v-cloak >
59+ < div >
60+ < hx-switch-control >
61+ < input type ="checkbox " id ="switchOnOffTest " />
62+ < label for ="switchOnOffTest ">
63+ < hx-switch onlabel ="on " offlabel ="off " aria-labelledby ="switchOnOffTest ">
64+ </ hx-switch >
65+ </ label >
66+ </ hx-switch-control >
67+ </ div >
2368
24- < div class ="example " id ="vue-switchDemo " v-cloak >
69+ < footer >
70+ < pre > < code v-text ="snippet "> </ code > </ pre >
71+ </ footer >
72+ </ div >
73+
74+ </ section >
75+
76+ <!-- end of demo on/off label example section for switch -->
77+
78+ <!-- start of demo yes/no label example section for switch -->
79+
80+ < section >
81+ < header >
82+ < h2 id ="yes-switch "> Switch with < b > < i > yes/no</ i > </ b > labels</ h2 >
83+ </ header >
84+ < p class ="hxSubdued hxSubBody ">
85+ < hx-icon type ="exclamation-triangle "> </ hx-icon >
86+ The label can be overridden to provide a different label (for i18n support).
87+ The character width is limited to 2-3 characters.
88+ </ p >
89+ < div class ="example " id ="vue-switchYesNoDemo " v-cloak >
90+ < div class ="hx2x ">
91+ < hx-switch-control >
92+ < input type ="checkbox " id ="switchYesNoTest " />
93+ < label for ="switchYesNoTest ">
94+ < hx-switch onlabel ="yes " offlabel ="no " aria-labelledby ="switchYesNoTest ">
95+ </ hx-switch >
96+ </ label >
97+ </ hx-switch-control >
98+ </ div >
99+
100+ < footer >
101+ < pre > < code v-text ="snippet "> </ code > </ pre >
102+ </ footer >
103+ </ div >
104+
105+ </ section >
106+
107+ <!-- end of demo yes/no label example section for switch -->
108+
109+ <!-- start of demo disabled example section for switch -->
110+
111+ < section >
112+ < header >
113+ < h2 id ="disabled-switch "> Disabled Switch</ h2 >
114+ </ header >
115+
116+ < div class ="example " id ="vue-switchDisabledDemo " v-cloak >
25117 < header >
26118 < form class ="beta-hxForm ">
27119
@@ -40,10 +132,10 @@ <h2 id="basic-checkbox">Switch</h2>
40132 </ header >
41133
42134 < div >
43- < hx-switch-control class =" switch " >
44- < input type ="checkbox " id ="switchTest " :disabled ="isDisabled " />
45- < label for ="switchTest ">
46- < hx-switch onlabel ="on " offlabel ="off " aria-labelledby ="switchTest " >
135+ < hx-switch-control >
136+ < input type ="checkbox " id ="switchDisabledTest " :disabled ="isDisabled " />
137+ < label for ="switchDisabledTest ">
138+ < hx-switch onlabel ="on " offlabel ="off " aria-labelledby ="switchDisabledTest " >
47139 </ hx-switch >
48140 </ label >
49141 </ hx-switch-control >
@@ -56,14 +148,16 @@ <h2 id="basic-checkbox">Switch</h2>
56148
57149 </ section >
58150
151+ <!-- end of demo disabled example section for switch -->
152+
59153 <!-- start of demo error example section for switch -->
60154
61155 < section >
62156 < header >
63- < h2 id ="basic-checkbox "> Error Switch</ h2 >
157+ < h2 id ="error-switch "> Error Switch</ h2 >
64158 </ header >
65159
66- < div class ="example " id ="vue-errorSwitchDemo " v-cloak >
160+ < div class ="example " id ="vue-switchErrorDemo " v-cloak >
67161 < header >
68162 < form class ="beta-hxForm ">
69163
@@ -82,10 +176,10 @@ <h2 id="basic-checkbox">Error Switch</h2>
82176 </ header >
83177
84178 < div >
85- < hx-switch-control class =" switch " >
86- < input type ="checkbox " id ="errorChkDemo " :invalid ="isInValid " />
87- < label for ="errorChkDemo ">
88- < hx-switch onlabel ="on " offlabel ="off " aria-labelledby ="switchTest " >
179+ < hx-switch-control >
180+ < input type ="checkbox " id ="switchErrorTest " :invalid ="isInValid " />
181+ < label for ="switchErrorTest ">
182+ < hx-switch onlabel ="on " offlabel ="off " aria-labelledby ="switchErrorTest " >
89183 </ hx-switch >
90184 </ label >
91185 </ hx-switch-control >
0 commit comments