UNPKG

@navikt/ds-react

Version:

React components from the Norwegian Labour and Welfare Administration.

11 lines (10 loc) 561 B
import { CustomPointerEvent } from "./dispatchCustomEvent"; /** * Listens for `pointerup` outside a react subtree. * Returns props to pass to the node we want to check for outside events. * By checking `isPointerInsideReactTreeRef` we can determine if the event happened outside the subtree of the node, saving some element-comparisons. */ export declare function usePointerUpOutside(callback?: (event: CustomPointerEvent) => void, ownerDocument?: Document, enabled?: boolean): { onPointerDownCapture: () => void; onPointerUpCapture: () => void; };