@atlaskit/editor-plugin-toolbar
Version:
Toolbar plugin for @atlaskit/editor-core
19 lines • 482 B
JavaScript
import React from 'react';
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
import { ToolbarSection } from '@atlaskit/editor-toolbar';
export const OverflowSection = ({
children,
hasSeparator,
testId
}) => {
const {
editorAppearance
} = useEditorToolbar();
if (editorAppearance === 'full-page') {
return null;
}
return /*#__PURE__*/React.createElement(ToolbarSection, {
hasSeparator: hasSeparator,
testId: testId
}, children);
};