@mitcsutt/kiln-dnd
Version:
Kiln drag and drop: sortable lists, boards, drop zones and grid layouts with one keyboard model and one announcer, rendered through kiln-ui
25 lines (24 loc) • 592 B
JavaScript
import { useDndController as e } from "../core/context.js";
import { useDragSource as t } from "../core/useDragSource.js";
//#region src/hooks/useDraggable.ts
function n(n) {
let r = e("useDraggable"), i = t(r, {
id: n.id,
label: n.label,
data: n.data,
disabled: n.disabled ?? !1,
kind: "zone",
instructions: "list",
hasHandle: n.handle ?? !1
});
return {
ref: i.ref,
handleRef: i.handleRef,
handleProps: i.handleProps,
isDragging: i.dragging !== null,
dragInput: i.dragging
};
}
//#endregion
export { n as useDraggable };
//# sourceMappingURL=useDraggable.js.map