@react-md/form
Version:
This package is for creating all the different form input types.
11 lines (10 loc) • 543 B
TypeScript
import type { HTMLAttributes } from "react";
declare type FocusElement = HTMLInputElement | HTMLTextAreaElement | HTMLLabelElement | HTMLSelectElement | HTMLDivElement;
declare type BlurEventHandler = React.FocusEventHandler<FocusElement>;
declare type FocusEventHandler = React.FocusEventHandler<FocusElement>;
declare type Options = Pick<HTMLAttributes<FocusElement>, "onBlur" | "onFocus">;
/**
* @internal
*/
export declare function useFocusState({ onFocus, onBlur, }: Options): [boolean, FocusEventHandler, BlurEventHandler];
export {};