Toggle component
Opened this issue · 0 comments
axross commented
A UI form element that allows the user to switch a boolean value.
Requirements
- It should support both controlled and uncontrolled behavior.
Props
checked?: string
defaultChecked?: string
loading?: boolean
disabled?: boolean
onChange?: (event: import("react").ChangeEvent<HTMLSpanElement> & { checked: boolean }) => void
style?: import("react").CSSProperties
children?: import("react").ReactNode
Rendered Elements
This component should render a <span>
element at the component root and all the given props should be provided to this element.
Event Handlers
This component should take any event handler.