1 | import type { BasicTarget } from '../utils/domTarget';
|
2 | type EventType = MouseEvent | TouchEvent;
|
3 | export interface Options {
|
4 | delay?: number;
|
5 | moveThreshold?: {
|
6 | x?: number;
|
7 | y?: number;
|
8 | };
|
9 | onClick?: (event: EventType) => void;
|
10 | onLongPressEnd?: (event: EventType) => void;
|
11 | }
|
12 | declare function useLongPress(onLongPress: (event: EventType) => void, target: BasicTarget, { delay, moveThreshold, onClick, onLongPressEnd }?: Options): void;
|
13 | export default useLongPress;
|