UNPKG

405 BTypeScriptView Raw
1import type { BasicTarget } from '../utils/domTarget';
2export interface Options {
3 onDragStart?: (event: React.DragEvent) => void;
4 onDragEnd?: (event: React.DragEvent) => void;
5 dragImage?: {
6 image: string | Element;
7 offsetX?: number;
8 offsetY?: number;
9 };
10}
11declare const useDrag: <T>(data: T, target: BasicTarget, options?: Options) => void;
12export default useDrag;