| 1 |
/// <reference types="react" /> |
| 2 |
export interface DraggableItemPosition { |
| 3 |
/** Parent droppableId */ |
| 4 |
droppableId: string; |
| 5 |
/** Index of item in parent Droppable */ |
| 6 |
index: number; |
| 7 |
} |
| 8 |
export declare const DragDropContext: import("react").Context<{ |
| 9 |
onDrag: (_source: DraggableItemPosition) => boolean; |
| 10 |
onDragMove: (_source: DraggableItemPosition, _dest?: DraggableItemPosition) => void; |
| 11 |
onDrop: (_source: DraggableItemPosition, _dest?: DraggableItemPosition) => boolean; |
| 12 |
}>; |
| 13 |
interface DragDropProps { |
| 14 |
/** Potentially Droppable and Draggable children */ |
| 15 |
children?: React.ReactNode; |
| 16 |
/** Callback for drag event. Return true to allow drag, false to disallow. */ |
| 17 |
onDrag?: (source: DraggableItemPosition) => boolean; |
| 18 |
/** Callback on mouse move while dragging. */ |
| 19 |
onDragMove?: (source: DraggableItemPosition, dest?: DraggableItemPosition) => void; |
| 20 |
/** Callback for drop event. Return true to allow drop, false to disallow. */ |
| 21 |
onDrop?: (source: DraggableItemPosition, dest?: DraggableItemPosition) => boolean; |
| 22 |
} |
| 23 |
export declare const DragDrop: React.FunctionComponent<DragDropProps>; |
| 24 |
export {}; |
| 25 |
//# sourceMappingURL=DragDrop.d.ts.map |