UNPKG

@atlaskit/editor-plugin-block-controls

Version:

Block controls plugin for @atlaskit/editor-core

9 lines 474 B
/** * Structural toolbar nodes do not render a control by themselves. Treat a surface as populated * only once a contributor has registered an interactive descendant. */ export var hasSurfaceControls = function hasSurfaceControls(components) { return components.some(function (component) { return Boolean(component.component) || component.type === 'button' || component.type === 'menu' || component.type === 'menu-item' || component.type === 'nested-menu'; }); };