UNPKG

@atlaskit/editor-plugin-status

Version:

Status plugin for @atlaskit/editor-core

36 lines 1.51 kB
import React from 'react'; import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages'; import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher'; import { STATUS_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys'; import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank'; import { StatusQuickInsertMenuItem } from './StatusQuickInsertMenuItem'; var previewImageUrls = { light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/se7cdbko55l5f1b6o8wp26lr470420wy.png', dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/7tnn52vck25nq56ornv4q55e065uhxyc.png' }; export var getStatusQuickInsertComponents = function getStatusQuickInsertComponents(_ref) { var api = _ref.api; return [{ key: STATUS_MENU_ITEM.key, type: STATUS_MENU_ITEM.type, parents: [{ key: STRUCTURE_SECTION.key, type: STRUCTURE_SECTION.type, rank: STRUCTURE_SECTION_RANK[STATUS_MENU_ITEM.key] }], match: createQuickInsertMatcher(function (_ref2) { var formatMessage = _ref2.formatMessage; return { description: formatMessage(messages.statusDescription), keywords: ['lozenge'], title: formatMessage(messages.status) }; }), component: function component() { return /*#__PURE__*/React.createElement(StatusQuickInsertMenuItem, { api: api, previewImageUrls: previewImageUrls }); } }]; };