UNPKG

ahooks

Version:
5 lines (4 loc) 316 B
import type { BasicTarget } from '../utils/domTarget'; type DocumentEventKey = keyof DocumentEventMap; declare const useClickAway: <T extends Event = Event>(onClickAway: (event: T) => void, target: BasicTarget | BasicTarget[], eventName?: DocumentEventKey | DocumentEventKey[]) => void; export default useClickAway;