ToggleProps
ToggleProps are the props of ReactComponent.Toggle. The wrapper’s type declarations do not cover this component, so the props come from Spotify’s settings page.
type ToggleProps = { value: boolean; onSelected: (value: boolean) => void; disabled?: boolean; id?: string; className?: string;};| Prop | Description |
|---|---|
value | true when the toggle is on. |
onSelected | Runs with the new value when the user clicks the toggle. |
disabled | Disables the toggle. |
id | The input’s ID, which a <label htmlFor> can point to. |
className | Extra class names. |