UNPKG

@atlaskit/editor-plugin-toolbar-lists-indentation

Version:

Toolbar lists and indentation plugin for @atlaskit/editor-core

22 lines (21 loc) • 859 B
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.MenuSection = void 0; var _react = _interopRequireDefault(require("react")); var _keys = require("@atlaskit/editor-common/toolbar/keys"); var _toolbarDropdownItemSection = require("@atlaskit/editor-toolbar/toolbar-dropdown-item-section"); var MenuSection = exports.MenuSection = function MenuSection(_ref) { var children = _ref.children, title = _ref.title, parents = _ref.parents; var hasSeparator = parents.some(function (parent) { return parent.key === _keys.TEXT_COLLAPSED_MENU.key; }); return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItemSection.ToolbarDropdownItemSection, { hasSeparator: hasSeparator, title: title }, children); };