UNPKG

@atlaskit/pragmatic-drag-and-drop-hitbox

Version:

An optional package for Pragmatic drag and drop that enables the attaching of interaction information to a drop target

21 lines (20 loc) • 509 B
import type { Instruction } from './list-item'; /** * Extract an instruction from the user data if it is available. * * * @example * * ```ts * monitorForElements({ * onDrop({location}) { * const innerMost = location.current.dropTargets[0]; * if(!innerMost) { * return; * } * const instruction: Instruction | null = extractInstruction(innerMost.data); * } * }); * ``` */ export declare function extractInstruction(userData: Record<string | symbol, unknown>): Instruction | null;