@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
19 lines (18 loc) • 589 B
TypeScript
import type { Direction } from 'react-beautiful-dnd';
/**
* ASSUMPTIONS:
* - Adjacent `<Draggable>` items are visually adjacent.
* - If there is an adjacent element, it is rendered.
*/
export declare function calculateGap({ element, where, direction, contextId, }: {
element: HTMLElement;
where: 'before' | 'after';
direction: Direction;
contextId: string;
}): number;
export declare function getGapOffset({ element, where, direction, contextId, }: {
element: HTMLElement;
where: 'before' | 'after';
direction: Direction;
contextId: string;
}): number;