@atlaskit/editor-plugin-media
Version:
Media plugin for @atlaskit/editor-core
24 lines (23 loc) • 996 B
JavaScript
/* MediaDropIndicator.tsx generated by @compiled/babel-plugin v3.0.2 */
import "./MediaDropIndicator.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
var styles = {
block: "_1e0c1ule _kqswh2mm _4t3iidpf _lcxvglyw",
inline: "_1e0c1o8l _kqswstnw _1bsbidpf _4t3i1j6v _lcxvglyw"
};
/**
* Anchors the shared drop indicator without adding space to the document.
* Keep its edge and terminal styling aligned with editor-plugin-block-controls/src/ui/drop-target.tsx.
*/
export var MediaDropIndicator = function MediaDropIndicator(_ref) {
var inline = _ref.inline;
return /*#__PURE__*/React.createElement("span", {
"aria-hidden": "true",
"data-testid": "media-drop-indicator",
className: ax([!inline && styles.block, inline && styles.inline])
}, /*#__PURE__*/React.createElement(DropIndicator, {
edge: inline ? 'left' : 'top'
}));
};