UNPKG

@atlaskit/editor-plugin-toolbar

Version:

Toolbar plugin for @atlaskit/editor-core

14 lines (13 loc) 610 B
import React from 'react'; import { useEditorToolbar } from '@atlaskit/editor-common/toolbar'; import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar'; export var OverflowMenuSection = function OverflowMenuSection(_ref) { var children = _ref.children; var _useEditorToolbar = useEditorToolbar(), editorViewMode = _useEditorToolbar.editorViewMode; var isEdit = editorViewMode === 'edit'; // only show separator in edit mode, when the pinned toolbar option is available return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, { hasSeparator: isEdit }, children); };