Debian Codegraph @

node/@patternfly/react-core/dist/esm/components/Menu/MenuItem.d.ts

raw
1 /// <reference types="react" />
2 import { TooltipProps } from '../Tooltip';
3 export interface MenuItemProps extends Omit<React.HTMLProps<HTMLLIElement>, 'onClick'> {
4 /** Content rendered inside the menu list item. */
5 children?: React.ReactNode;
6 /** Additional classes added to the menu list item */
7 className?: string;
8 /** Identifies the component in the Menu onSelect or onActionClick callback */
9 itemId?: any;
10 /** Target navigation link. Should not be used if the flyout prop is defined. */
11 to?: string;
12 /** Navigation link target. Only set when the to property is present. If isExternalLink is also passed in, this property will be set to "_blank". */
13 target?: string;
14 /** Navigation link relationship. Only set when the to property is present. */
15 rel?: string;
16 /** Navigation link download. Only set when the to property is present. */
17 download?: string;
18 /** Flag indicating the item has a checkbox */
19 hasCheckbox?: boolean;
20 /** Flag indicating whether the item is active */
21 isActive?: boolean;
22 /** Flag indicating if the item is favorited */
23 isFavorited?: boolean;
24 /** Flag indicating if the item causes a load */
25 isLoadButton?: boolean;
26 /** Flag indicating a loading state */
27 isLoading?: boolean;
28 /** Callback for item click */
29 onClick?: (event?: any) => void;
30 /** Component used to render the menu item */
31 component?: React.ElementType<any> | React.ComponentType<any>;
32 /** Render item as disabled option */
33 isDisabled?: boolean;
34 /** Render item as aria-disabled option */
35 isAriaDisabled?: boolean;
36 /** Props for adding a tooltip to a menu item */
37 tooltipProps?: TooltipProps;
38 /** Render item with icon */
39 icon?: React.ReactNode;
40 /** Render item with one or more actions */
41 actions?: React.ReactNode;
42 /** Description of the menu item */
43 description?: React.ReactNode;
44 /** Render an external link icon on focus or hover, and set the link's
45 * "target" attribute to a value of "_blank".
46 */
47 isExternalLink?: boolean;
48 /** Flag indicating if the option is selected */
49 isSelected?: boolean;
50 /** Flag indicating the item is focused */
51 isFocused?: boolean;
52 /** Flag indicating the item is in danger state */
53 isDanger?: boolean;
54 /** Flyout menu. Should not be used if the to prop is defined. */
55 flyoutMenu?: React.ReactElement<any>;
56 /** Callback function when mouse leaves trigger */
57 onShowFlyout?: (event?: any) => void;
58 /** Drilldown menu of the item. Should be a Menu or DrilldownMenu type. */
59 drilldownMenu?: React.ReactNode | (() => React.ReactNode);
60 /** Sub menu direction */
61 direction?: 'down' | 'up';
62 /** True if item is on current selection path */
63 isOnPath?: boolean;
64 /** Adds an accessible name to the menu item. */
65 'aria-label'?: string;
66 /** @hide Forwarded ref */
67 innerRef?: React.Ref<HTMLAnchorElement | HTMLButtonElement>;
68 /** Sets the id attribute on the menu item component. */
69 id?: string;
70 }
71 export declare const MenuItem: import("react").ForwardRefExoticComponent<Omit<MenuItemProps, "ref"> & import("react").RefAttributes<any>>;
72 //# sourceMappingURL=MenuItem.d.ts.map