UNPKG

@atlaskit/editor-plugin-extension

Version:

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

46 lines 1.63 kB
import React from 'react'; // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss import { Box, Flex, xcss } from '@atlaskit/primitives'; import { withExtensionManifest } from '../withExtensionManifest'; const itemBodyStyles = xcss({ display: 'flex', flexDirection: 'row', flexWrap: 'nowrap', justifyContent: 'space-between', margin: 'space.200', flexGrow: 3 }); const itemTextStyles = xcss({ maxWidth: '100%', whiteSpace: 'initial' }); const summaryStyles = xcss({ font: "var(--ds-font-body-small, normal 400 12px/16px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)", color: 'color.text.subtlest', marginTop: 'space.050', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }); function HeaderAfterIconElement({ extensionManifest }) { const title = extensionManifest.title; const summary = extensionManifest.summary; return /*#__PURE__*/React.createElement(Box, { xcss: itemBodyStyles }, summary ? /*#__PURE__*/React.createElement(Box, { xcss: itemTextStyles }, /*#__PURE__*/React.createElement("div", { id: "context-panel-title", "data-testid": "context-panel-title" }, title), /*#__PURE__*/React.createElement(Box, { xcss: summaryStyles }, summary)) : /*#__PURE__*/React.createElement(Flex, { direction: "column", alignItems: "center", testId: "context-panel-title" }, title)); } const _default_1 = withExtensionManifest(HeaderAfterIconElement); export default _default_1;