rooks
Version:
Essential React custom hooks ⚓ to super charge your components!
14 lines • 523 B
TypeScript
import { DOMAttributes, FocusEvents } from "@react-types/shared";
declare type FocusProps = FocusEvents;
interface FocusResult<T> {
/** Props to spread onto the target element. */
focusProps: DOMAttributes<T>;
}
/**
* useFocus
* @description Handles focus events for the immediate target element.
* @see {@link https://react-hooks.org/docs/useFocus}
*/
declare const useFocus: <T extends HTMLElement>(props: FocusProps) => FocusResult<T>;
export { useFocus };
//# sourceMappingURL=useFocus.d.ts.map