UNPKG

@atlaskit/editor-plugin-annotation

Version:

Annotation plugin for @atlaskit/editor-core

43 lines (42 loc) 1.48 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.getToolbarComponents = void 0; var _react = _interopRequireDefault(require("react")); var _toolbar = require("@atlaskit/editor-common/toolbar"); var _CommentButton = require("./CommentButton/CommentButton"); var getToolbarComponents = exports.getToolbarComponents = function getToolbarComponents(api, annotationProviders) { return [{ type: _toolbar.COLLAB_SECTION.type, key: _toolbar.COLLAB_SECTION.key, parents: [{ type: 'toolbar', key: _toolbar.TOOLBARS.INLINE_TEXT_TOOLBAR, rank: _toolbar.TOOLBAR_RANK[_toolbar.COLLAB_SECTION.key] }] }, { type: _toolbar.COMMENT_GROUP.type, key: _toolbar.COMMENT_GROUP.key, parents: [{ type: _toolbar.COLLAB_SECTION.type, key: _toolbar.COLLAB_SECTION.key, rank: _toolbar.TOOLBAR_RANK[_toolbar.COLLAB_SECTION.key] }] }, { type: _toolbar.COMMENT_HERO_BUTTON.type, key: _toolbar.COMMENT_HERO_BUTTON.key, parents: [{ type: _toolbar.COMMENT_GROUP.type, key: _toolbar.COMMENT_GROUP.key, rank: _toolbar.COLLAB_SECTION_RANK[_toolbar.COMMENT_GROUP.key] }], component: function component() { return /*#__PURE__*/_react.default.createElement(_CommentButton.CommentButton, { api: api, annotationProviders: annotationProviders }); } }]; };