import { useDrag } from 'react-dnd'; interface DraggableStepProps { step: { id: string; name: string; }; type: string; } function DraggableStep({ step, type }: DraggableStepProps) { const [{ isDragging }, drag] = useDrag(() => ({ type: 'step', item: { id: step.id, name: step.name, stepType: type }, collect: (monitor: any) => ({ isDragging: !!monitor.isDragging(), }), })); return (
{step.name}