import { useSortable } from "@dnd-kit/sortable"; import { CSS } from "@dnd-kit/utilities"; interface Props { id: string; className: string; children: React.ReactNode; } const SortableItem: React.FC = ({ id, className, children }: Props) => { const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id }); const style = { transform: CSS.Transform.toString(transform), transition, }; return (
{children}
); }; export default SortableItem;