Switch

Example

{
"state": {
"bind": "mode",
"view": {
"type": "Switch",
"props": {
"checkedValue": "enabled",
"unCheckedValue": "disabled",
"checkedChildren": "On",
"unCheckedChildren": "Close"
}
}
}
}

Props

interface IProps extends SwitchProps {
checkedValue: boolean | string
unCheckedValue: boolean | string
}

API

PropertiesDescriptionTypeDefaultRequiredVersion
checkedValuechecked value`booleanstring`-yes
unCheckedValueunchecked value`booleanstring`-yes

For other properties, see Antd Switch

Switch

Example

{
"state": {
"bind": "mode",
"view": {
"type": "Switch",
"props": {
"checkedValue": "enabled",
"unCheckedValue": "disabled",
"checkedChildren": "On",
"unCheckedChildren": "Close"
}
}
}
}

Props

interface IProps extends SwitchProps {
checkedValue: boolean | string
unCheckedValue: boolean | string
}

API

PropertiesDescriptionTypeDefaultRequiredVersion
checkedValuechecked value`booleanstring`-yes
unCheckedValueunchecked value`booleanstring`-yes

For other properties, see Antd Switch