UNPKG

@hello-pangea/dnd

Version:

Beautiful and accessible drag and drop for lists with React

16 lines (11 loc) 332 B
import type { ImpactLocation, DroppableId, DragImpact } from '../../types'; export default (impact: DragImpact): DroppableId | null => { const at: ImpactLocation | null = impact.at; if (!at) { return null; } if (at.type === 'REORDER') { return at.destination.droppableId; } return at.combine.droppableId; };