react-beautiful-dragify
Version:
React drag and drop library alternatie of react-beautiful-dnd
20 lines (19 loc) • 661 B
TypeScript
/// <reference types="react" />
import type { DraggableOptions } from '../types/types';
export declare const useDraggable: (options: DraggableOptions) => {
draggableProps: {
ref: import("react").MutableRefObject<HTMLElement | null>;
draggable: boolean;
'data-draggable': string;
'data-index': number;
onDragStart: (e: React.DragEvent<Element>) => void;
onDragEnd: () => void;
};
dragHandleProps: {
'data-draghandle': boolean;
tabIndex: number;
role: string;
'aria-grabbed': boolean;
onKeyDown: (event: import("react").KeyboardEvent<Element>) => void;
};
};