UNPKG

@atlaskit/editor-plugin-toolbar

Version:

Toolbar plugin for @atlaskit/editor-core

21 lines • 940 B
import React from 'react'; import { useIntl } from 'react-intl'; import { toolbarMessages } from '@atlaskit/editor-common/messages/toolbar'; import { ShowMoreHorizontalIcon } from '@atlaskit/editor-toolbar/show-more-horizontal'; import { ToolbarDropdownMenu } from '@atlaskit/editor-toolbar/toolbar-dropdown-menu'; import { ToolbarTooltip } from '@atlaskit/editor-toolbar/toolbar-tooltip'; export var OverflowMenu = function OverflowMenu(_ref) { var children = _ref.children; var intl = useIntl(); var tooltipContent = intl.formatMessage(toolbarMessages.selectionToolbarOverflowMenuTooltip); return /*#__PURE__*/React.createElement(ToolbarDropdownMenu, { label: tooltipContent, iconBefore: /*#__PURE__*/React.createElement(ShowMoreHorizontalIcon, { label: "" }), tooltipComponent: /*#__PURE__*/React.createElement(ToolbarTooltip, { content: tooltipContent, position: "top" }) }, children); };