import React from "react"; import { useDraggable } from "@dnd-kit/core"; export function Draggable(props) { const { id } = props; const { attributes, listeners, setNodeRef, transform, isDragging } = useDraggable({ id, }); const style = transform ? { transform: `translate3d(${transform.x}px, ${transform.y}px, 0)`, opacity: 0.6, } : undefined; const className = transform ? "z-30 shadow-xl relative w-min " : "z-10 relative w-min"; return (
{props.children}
); }