Skip to content

Commit 205f84d

Browse files
authored
Switch - fix docs page (#3705)
* Switch - fix docs page * Fix background and change images to not have bg
1 parent 0676664 commit 205f84d

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

src/components/switch/switch.api.json

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,13 @@
8181
"snippet": [
8282
"function Example(props) {",
8383
" 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}/>;",
8985
"}"
9086
],
9187
"docs": {
9288
"hero": {
9389
"title": "Switch",
94-
"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. ",
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. ",
9591
"type": "hero",
9692
"layout": "horizontal",
9793
"content": [
@@ -125,7 +121,8 @@
125121
"description": "",
126122
"content": [
127123
{
128-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Switch/switch_overview_style_light.png"
124+
"background": "#A6ACB1",
125+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Switch/SwitchLight.png"
129126
}
130127
]
131128
}
@@ -149,7 +146,8 @@
149146
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Switch/switch_overview_state_default_on.png"
150147
},
151148
{
152-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Switch/switch_overview_state_light_on.png"
149+
"background": "#A6ACB1",
150+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Switch/SwitchLight.png"
153151
}
154152
]
155153
},
@@ -161,7 +159,8 @@
161159
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Switch/switch_overview_state_default_off.png"
162160
},
163161
{
164-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Switch/switch_overview_state_light_off.png"
162+
"background": "#A6ACB1",
163+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Switch/SwitchLightOff.png"
165164
}
166165
]
167166
},
@@ -173,7 +172,8 @@
173172
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Switch/switch_overview_state_default_disabledOn.png"
174173
},
175174
{
176-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Switch/switch_overview_state_light_disabledOn.png"
175+
"background": "#A6ACB1",
176+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Switch/SwitchLightDisabled.png"
177177
}
178178
]
179179
},
@@ -185,7 +185,8 @@
185185
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Switch/switch_overview_state_default_disabledOff.png"
186186
},
187187
{
188-
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Switch/switch_overview_state_light_disabledOff.png"
188+
"background": "#A6ACB1",
189+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Switch/SwitchLightDisabledOff.png"
189190
}
190191
]
191192
}
@@ -197,17 +198,21 @@
197198
"type": "list",
198199
"items": [
199200
{
200-
"title": "",
201-
"description": "markdown: \n### Size \nOne size ",
201+
"title": "Size",
202+
"description": "Currently, only one size available for the ToggleSwitch.",
202203
"content": [
203204
{
204-
"value": "https://embed.figma.com/design/xFjvYNkGTmYTGYMLrmz9Ir/Docs-Assets?node-id=52-7459&embed-host=share"
205+
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components%20Docs/Switch/switch_overview_spec_size.png"
205206
}
206207
]
207208
},
208209
{
209-
"title": "",
210-
"description": "markdown: \n### Haptic \nHaptic is played on tap.\nHaptic preset: [impactMedium]",
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]",
211216
"content": [
212217
{
213218
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Switch/switch_overview_spec_haptic.png"

0 commit comments

Comments
 (0)