Debian Codegraph @

node/@patternfly/react-core/dist/js/components/Menu/MenuContainer.d.ts

raw
1 /// <reference types="react" />
2 import type { PopperOptions } from '../../helpers/Popper/Popper';
3 /** @deprecated Use PopperOptions instead */
4 export type MenuPopperProps = PopperOptions;
5 export interface MenuContainerProps {
6 /** Menu to be rendered */
7 menu: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
8 /** Reference to the menu */
9 menuRef: React.RefObject<any>;
10 /** Toggle to be rendered */
11 toggle: React.ReactNode;
12 /** Reference to the toggle */
13 toggleRef: React.RefObject<any>;
14 /** Flag to indicate if menu is opened.*/
15 isOpen: boolean;
16 /** Callback to change the open state of the menu.
17 * Triggered by clicking outside of the menu, or by pressing any keys specified in onOpenChangeKeys. */
18 onOpenChange?: (isOpen: boolean) => void;
19 /** Keys that trigger onOpenChange, defaults to tab and escape. It is highly recommended to include Escape in the array, while Tab may be omitted if the menu contains non-menu items that are focusable. */
20 onOpenChangeKeys?: string[];
21 /** Callback to override the toggle keydown behavior. By default, when the toggle has focus and the menu is open, pressing the up/down arrow keys will focus a valid non-disabled menu item - the first item for the down arrow key and last item for the up arrow key. */
22 onToggleKeydown?: (event: KeyboardEvent) => void;
23 /** z-index of the dropdown menu */
24 zIndex?: number;
25 /** Additional properties to pass to the Popper */
26 popperProps?: PopperOptions;
27 /** @beta Flag indicating the first menu item should be focused after opening the dropdown. */
28 shouldFocusFirstItemOnOpen?: boolean;
29 /** Flag indicating if scroll on focus of the first menu item should occur. */
30 shouldPreventScrollOnItemFocus?: boolean;
31 /** Time in ms to wait before firing the toggles' focus event. Defaults to 0 */
32 focusTimeoutDelay?: number;
33 }
34 /**
35 * Container that links a menu and menu toggle together, to handle basic keyboard input and control the opening and closing of a menu.
36 */
37 export declare const MenuContainer: React.FunctionComponent<MenuContainerProps>;
38 //# sourceMappingURL=MenuContainer.d.ts.map