@matthew.ngo/react-form-kit
Version:
Form Kit for React. It consists of a set of components that can be used to create complex forms in a simple and declarative way.
11 lines (10 loc) • 318 B
TypeScript
interface UseToggleSwitchProps {
isOn: boolean;
onChange?: (checked: boolean) => void;
disabled: boolean;
}
export declare const useToggleSwitch: ({ isOn, onChange, disabled, }: UseToggleSwitchProps) => {
handleToggle: () => void;
handleKeyDown: (event: React.KeyboardEvent) => void;
};
export {};