UNPKG

@atlaskit/editor-plugin-selection-extension

Version:

editor-plugin-selection-extension plugin for @atlaskit/editor-core

34 lines (33 loc) 1.46 kB
import React from 'react'; import { injectIntl } from 'react-intl'; import { selectionExtensionMessages } from '@atlaskit/editor-common/messages'; import { ToolbarButton } from '@atlaskit/editor-common/ui-menu'; import AppsIcon from '@atlaskit/icon/core/apps'; import ChevronDownIcon from '@atlaskit/icon/core/chevron-down'; const SelectionExtensionDropdownMenuButtonComponent = ({ onClick, selected, 'aria-expanded': ariaExpanded, intl }) => { return /*#__PURE__*/React.createElement(ToolbarButton, { testId: "selection-extension-dropdown-button", "aria-label": intl.formatMessage(selectionExtensionMessages.selectionExtensionDropdownButtonLabel), "aria-haspopup": "true", spacing: "compact", title: intl.formatMessage(selectionExtensionMessages.selectionExtensionDropdownButtonLabel), onClick: onClick, "aria-expanded": ariaExpanded, selected: selected, iconAfter: /*#__PURE__*/React.createElement(ChevronDownIcon, { spacing: "none", label: intl.formatMessage(selectionExtensionMessages.selectionExtensionDropdownButtonLabel), size: "small" }) }, /*#__PURE__*/React.createElement(AppsIcon, { label: intl.formatMessage(selectionExtensionMessages.selectionExtensionDropdownButtonLabel), spacing: "none" })); }; // eslint-disable-next-line @typescript-eslint/ban-types export const SelectionExtensionDropdownMenuButton = injectIntl(SelectionExtensionDropdownMenuButtonComponent);