UNPKG

@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration

Version:

An optional Pragmatic drag and drop package that enables rapid migration from react-beautiful-dnd to Pragmatic drag and drop

20 lines (19 loc) 493 B
import { attributes } from './attributes'; import { findElement } from './find-element'; /** * Obtains the `HTMLElement` with the data attribute passed down through * `provided.dragHandleProps` */ export function findDragHandle({ contextId, draggableId }) { // Otherwise the drag handle is a descendant. return findElement({ attribute: attributes.dragHandle.contextId, value: contextId }, { attribute: attributes.dragHandle.draggableId, value: draggableId }); }