@navikt/ds-react
Version:
React components from the Norwegian Labour and Welfare Administration.
9 lines (8 loc) • 346 B
TypeScript
import { CustomFocusEvent } from "./dispatchCustomEvent.js";
/**
* Tracks focus outside a React subtree. Returns props for the subtree root.
*/
export declare function useFocusOutside(callback?: (event: CustomFocusEvent) => void, ownerDocument?: Document, enabled?: boolean): {
onFocusCapture: () => void;
onBlurCapture: () => void;
};