UNPKG

@atlaskit/pragmatic-drag-and-drop-react-drop-indicator

Version:

An optional Pragmatic drag and drop package containing react components that provide a visual indication about what the user will achieve when the drop (eg lines)

26 lines (25 loc) 841 B
import React from 'react'; import { Line } from './internal/line'; import { presetStrokeColors } from './presets'; /** * __Drop indicator__ * * A drop indicator is used to communicate the intended resting place of the draggable item. The orientation of the drop indicator should always match the direction of the content flow. */ export function DropIndicator(_ref) { var _ref$appearance = _ref.appearance, appearance = _ref$appearance === void 0 ? 'default' : _ref$appearance, edge = _ref.edge, gap = _ref.gap, indent = _ref.indent, type = _ref.type; return /*#__PURE__*/React.createElement(Line, { edge: edge, gap: gap, strokeColor: presetStrokeColors[appearance], type: type, indent: indent }); } // This default export is intended for usage with React.lazy export default DropIndicator;