@atlaskit/editor-plugin-selection-extension
Version:
editor-plugin-selection-extension plugin for @atlaskit/editor-core
9 lines • 433 B
JavaScript
/**
* Type guard to check if the given configuration is for a dropdown menu.
*
* @param item - The menu item configuration to check, either menu item or dropdown menu
* @returns True if the item configuration is for a dropdown menu, false otherwise
*/
export var isNestedDropdownMenuConfiguration = function isNestedDropdownMenuConfiguration(item) {
return 'getMenuItems' in item && typeof item.getMenuItems === 'function';
};