ToggleButton
@shopify/shop-minis-platform-sdk / components/ToggleButton
ToggleButtonProps
Properties
disabled?
optional
disabled:boolean
If true, the button will not be clickable and disabled styles will be applied
isListItem?
optional
isListItem:boolean
Adds a delay to the onPress callback to avoid triggering while scrolling if part of a list
label
label:
string
The text that will appear inside the toggle button
onPress()?
optional
onPress: (label
) =>void
Optional function to be called when toggle is pressed.
Parameters
Parameter | Type |
---|---|
label | string |
Returns
void
secondaryLabel?
optional
secondaryLabel:string
Optional label to be displayed at the right of the button, before the selected icon.
selected?
optional
selected:boolean
The selected state of the toggle
style?
optional
style:MultipleChoiceStyles
textDecoration?
optional
textDecoration:"none"
|"underline"
|"line-through"
|"underline line-through"
Text style to be applied to the label of the button
ToggleButton()
ToggleButton(
__namedParameters
):Element
Parameters
Parameter | Type |
---|---|
__namedParameters | ToggleButtonProps |
Returns
Element