UNPKG

@platform/react

Version:

React refs and helpers.

7 lines (6 loc) 343 B
import { RefObject } from 'react'; declare type E = HTMLElement; declare type Stage = 'down' | 'up'; export declare function useClickOutside(stage: Stage, ref: RefObject<E>, callback?: (e: MouseEvent) => void): void; export declare function useClickWithin(stage: Stage, ref: RefObject<E>, callback?: (e: MouseEvent) => void): void; export {};