@atlaskit/editor-plugin-block-controls
Version:
Block controls plugin for @atlaskit/editor-core
20 lines (19 loc) • 765 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.shouldUseNestedDragHandleIcon = void 0;
var _fg = require("@atlaskit/platform-feature-flags/fg");
// Nested icon for non-top-level nodes. Exception: with the
// kill switch OFF, layout columns use the full block handle instead.
// TODO: EDITOR-7732 - remove this whole function when
// `platform_editor_layout_column_menu_kill_switch_1` is cleaned up
var shouldUseNestedDragHandleIcon = exports.shouldUseNestedDragHandleIcon = function shouldUseNestedDragHandleIcon(isTopLevelNode, isLayoutColumn) {
if (isTopLevelNode) {
return false;
}
if (isLayoutColumn && !(0, _fg.fg)('platform_editor_layout_column_menu_kill_switch_1')) {
return false;
}
return true;
};