Seed Bible extension API (v1.19.0) / seed-bible/components / SwitchProps
Type Alias: SwitchProps
type SwitchProps = Omit<
JSX.InputHTMLAttributes<HTMLInputElement>,
"type" | "role" | "checked" | "onChange" | "class" | "className" | "children"
> & {
checked: boolean;
class?: string;
className?: string;
inputRef?: Ref<HTMLInputElement>;
onToggled: (checked: boolean) => void;
};Type Declaration
checked
checked: boolean;class?
class?: string;className?
className?: string;Extra classes, for placement. class and className both work.
inputRef?
inputRef?: Ref<HTMLInputElement>;The <input> element, for code that has to focus it.
onToggled
onToggled: (checked: boolean) => void;Called with the new value when the switch is flipped.
Parameters
| Parameter | Type |
|---|---|
checked | boolean |
Returns
void