@datamonsterr/vdt-dashboard
Version:
13 lines • 445 B
TypeScript
import type { DragEndEvent, UniqueIdentifier } from '@dnd-kit/core';
interface UseDragAndDropProps<T> {
items: T[];
getId: (item: T) => UniqueIdentifier;
}
export declare function useDragAndDrop<T>({ items, getId }: UseDragAndDropProps<T>): {
items: T[];
handleDragEnd: (event: DragEndEvent) => void;
resetItems: () => void;
updateItems: (newItems: T[]) => void;
};
export {};
//# sourceMappingURL=useDragAndDrop.d.ts.map