react-native-ui-lib 7.40.1-snapshot.6867 → 7.40.1-snapshot.6872
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -81,17 +81,13 @@
|
|
|
81
81
|
"snippet": [
|
|
82
82
|
"function Example(props) {",
|
|
83
83
|
" const [value, setValue] = useState(false$1);",
|
|
84
|
-
" return
|
|
85
|
-
" <div>",
|
|
86
|
-
" <Switch value={value$2} onValueChange={setValue$3}/>",
|
|
87
|
-
" </div>",
|
|
88
|
-
" );",
|
|
84
|
+
" return <Switch margin-20 value={value$2} onValueChange={setValue$3}/>;",
|
|
89
85
|
"}"
|
|
90
86
|
],
|
|
91
87
|
"docs": {
|
|
92
88
|
"hero": {
|
|
93
89
|
"title": "Switch",
|
|
94
|
-
"description": "Use switches to toggle a single option on or off, activate or deactivate, and switch between two different states.
|
|
90
|
+
"description": "Use switches to toggle a single option on or off, activate or deactivate, and switch between two different states. \n\nConsider using switch instead of checkbox, when appropriate. \nConsider using switch instead of radio buttons if there’s only two options to choose from. ",
|
|
95
91
|
"type": "hero",
|
|
96
92
|
"layout": "horizontal",
|
|
97
93
|
"content": [
|
|
@@ -125,7 +121,8 @@
|
|
|
125
121
|
"description": "",
|
|
126
122
|
"content": [
|
|
127
123
|
{
|
|
128
|
-
"
|
|
124
|
+
"background": "#A6ACB1",
|
|
125
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Switch/SwitchLight.png"
|
|
129
126
|
}
|
|
130
127
|
]
|
|
131
128
|
}
|
|
@@ -149,7 +146,8 @@
|
|
|
149
146
|
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Switch/switch_overview_state_default_on.png"
|
|
150
147
|
},
|
|
151
148
|
{
|
|
152
|
-
"
|
|
149
|
+
"background": "#A6ACB1",
|
|
150
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Switch/SwitchLight.png"
|
|
153
151
|
}
|
|
154
152
|
]
|
|
155
153
|
},
|
|
@@ -161,7 +159,8 @@
|
|
|
161
159
|
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Switch/switch_overview_state_default_off.png"
|
|
162
160
|
},
|
|
163
161
|
{
|
|
164
|
-
"
|
|
162
|
+
"background": "#A6ACB1",
|
|
163
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Switch/SwitchLightOff.png"
|
|
165
164
|
}
|
|
166
165
|
]
|
|
167
166
|
},
|
|
@@ -173,7 +172,8 @@
|
|
|
173
172
|
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Switch/switch_overview_state_default_disabledOn.png"
|
|
174
173
|
},
|
|
175
174
|
{
|
|
176
|
-
"
|
|
175
|
+
"background": "#A6ACB1",
|
|
176
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Switch/SwitchLightDisabled.png"
|
|
177
177
|
}
|
|
178
178
|
]
|
|
179
179
|
},
|
|
@@ -185,7 +185,8 @@
|
|
|
185
185
|
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Switch/switch_overview_state_default_disabledOff.png"
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
|
-
"
|
|
188
|
+
"background": "#A6ACB1",
|
|
189
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Switch/SwitchLightDisabledOff.png"
|
|
189
190
|
}
|
|
190
191
|
]
|
|
191
192
|
}
|
|
@@ -197,17 +198,21 @@
|
|
|
197
198
|
"type": "list",
|
|
198
199
|
"items": [
|
|
199
200
|
{
|
|
200
|
-
"title": "",
|
|
201
|
-
"description": "
|
|
201
|
+
"title": "Size",
|
|
202
|
+
"description": "Currently, only one size available for the ToggleSwitch.",
|
|
202
203
|
"content": [
|
|
203
204
|
{
|
|
204
|
-
"value": "https://
|
|
205
|
+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Switch/switch_overview_spec_size.png"
|
|
205
206
|
}
|
|
206
207
|
]
|
|
207
208
|
},
|
|
208
209
|
{
|
|
209
|
-
"title": "",
|
|
210
|
-
"description": "markdown:
|
|
210
|
+
"title": "Colors",
|
|
211
|
+
"description": "markdown:<b>ON</b><br>Background color: $backgroundPrimaryHeavy<br>Knob color: $iconDefaultLight<br><b>OFF</b><br>Background color: $backgroundNeutralHeavy<br>Knob color: $iconDefaultLight<br><b>Disabled</b><br>Background color: $backgroundDisabled<br>Knob color: $iconDefaultLight"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"title": "Haptic ",
|
|
215
|
+
"description": "Haptic is played on tap. Haptic preset: [impactMedium]",
|
|
211
216
|
"content": [
|
|
212
217
|
{
|
|
213
218
|
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Switch/switch_overview_spec_haptic.png"
|