UNPKG

@atlaskit/editor-plugin-status

Version:

Status plugin for @atlaskit/editor-core

32 lines • 1.31 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'; const previewImageUrls = { light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/se7cdbko55l5f1b6o8wp26lr470420wy.png', dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/7tnn52vck25nq56ornv4q55e065uhxyc.png' }; export const getStatusQuickInsertComponents = ({ api }) => [{ 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(({ formatMessage }) => ({ description: formatMessage(messages.statusDescription), keywords: ['lozenge'], title: formatMessage(messages.status) })), component: () => /*#__PURE__*/React.createElement(StatusQuickInsertMenuItem, { api: api, previewImageUrls: previewImageUrls }) }];