@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
9 lines • 390 B
JavaScript
import { uniqueKey } from './closest-edge';
/**
* Returns the value added by `attachClosestEdge()` to the `userData` object. It will return `null` if there is no value.
*/
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
export function extractClosestEdge(userData) {
var _ref;
return (_ref = userData[uniqueKey]) !== null && _ref !== void 0 ? _ref : null;
}