@atlaskit/editor-plugin-insert-block
Version:
Insert block plugin for @atlaskit/editor-core
29 lines • 1.13 kB
JavaScript
import React from 'react';
import { TableSelectorPopup } from '@atlaskit/editor-common/ui';
export var TableSelectorPopupWrapper = function TableSelectorPopupWrapper(_ref) {
var isOpen = _ref.isOpen,
targetRef = _ref.targetRef,
isOpenedByKeyboard = _ref.isOpenedByKeyboard,
onSelection = _ref.onSelection,
onClickOutside = _ref.onClickOutside,
onEscapeKeydown = _ref.onEscapeKeydown,
onUnmount = _ref.onUnmount,
popupsMountPoint = _ref.popupsMountPoint,
popupsBoundariesElement = _ref.popupsBoundariesElement,
popupsScrollableElement = _ref.popupsScrollableElement;
if (!isOpen || !targetRef.current) {
return null;
}
return /*#__PURE__*/React.createElement(TableSelectorPopup, {
allowOutsideSelection: true,
target: targetRef.current,
onUnmount: onUnmount,
onSelection: onSelection,
popupsMountPoint: popupsMountPoint,
popupsBoundariesElement: popupsBoundariesElement,
popupsScrollableElement: popupsScrollableElement,
handleClickOutside: onClickOutside,
handleEscapeKeydown: onEscapeKeydown,
isOpenedByKeyboard: isOpenedByKeyboard
});
};