-
Notifications
You must be signed in to change notification settings - Fork 4
Switch
Andrew Sutton edited this page Jan 26, 2024
·
3 revisions
[<ReactComponent>]
let SwitchTest() =
let checked', setChecked = React.useState false
Fui.switch [
switch.checked' checked'
switch.label (if checked' then "With label above and checked" else "With label above and unchecked")
switch.labelPosition.above
switch.onChange (fun (d: SwitchOnChangeData) -> setChecked d.``checked``)
]