1 | import type { CSSMotionProps } from 'rc-motion';
|
2 | import * as React from 'react';
|
3 | import type { BuiltinPlacements, Components, ItemType, MenuClickEventHandler, MenuMode, MenuRef, RenderIconType, SelectEventHandler, TriggerSubMenuAction } from './interface';
|
4 | export interface MenuProps extends Omit<React.HTMLAttributes<HTMLUListElement>, 'onClick' | 'onSelect' | 'dir'> {
|
5 | prefixCls?: string;
|
6 | rootClassName?: string;
|
7 | items?: ItemType[];
|
8 |
|
9 | children?: React.ReactNode;
|
10 | disabled?: boolean;
|
11 |
|
12 | disabledOverflow?: boolean;
|
13 |
|
14 | direction?: 'ltr' | 'rtl';
|
15 | mode?: MenuMode;
|
16 | inlineCollapsed?: boolean;
|
17 | defaultOpenKeys?: string[];
|
18 | openKeys?: string[];
|
19 | activeKey?: string;
|
20 | defaultActiveFirst?: boolean;
|
21 | selectable?: boolean;
|
22 | multiple?: boolean;
|
23 | defaultSelectedKeys?: string[];
|
24 | selectedKeys?: string[];
|
25 | onSelect?: SelectEventHandler;
|
26 | onDeselect?: SelectEventHandler;
|
27 | inlineIndent?: number;
|
28 |
|
29 | motion?: CSSMotionProps;
|
30 |
|
31 | defaultMotions?: Partial<{
|
32 | [key in MenuMode | 'other']: CSSMotionProps;
|
33 | }>;
|
34 | subMenuOpenDelay?: number;
|
35 | subMenuCloseDelay?: number;
|
36 | forceSubMenuRender?: boolean;
|
37 | triggerSubMenuAction?: TriggerSubMenuAction;
|
38 | builtinPlacements?: BuiltinPlacements;
|
39 | itemIcon?: RenderIconType;
|
40 | expandIcon?: RenderIconType;
|
41 | overflowedIndicator?: React.ReactNode;
|
42 |
|
43 | overflowedIndicatorPopupClassName?: string;
|
44 | getPopupContainer?: (node: HTMLElement) => HTMLElement;
|
45 | onClick?: MenuClickEventHandler;
|
46 | onOpenChange?: (openKeys: string[]) => void;
|
47 | |
48 |
|
49 |
|
50 |
|
51 | _internalRenderMenuItem?: (originNode: React.ReactElement, menuItemProps: any, stateProps: {
|
52 | selected: boolean;
|
53 | }) => React.ReactElement;
|
54 | |
55 |
|
56 |
|
57 |
|
58 | _internalRenderSubMenuItem?: (originNode: React.ReactElement, subMenuItemProps: any, stateProps: {
|
59 | selected: boolean;
|
60 | open: boolean;
|
61 | active: boolean;
|
62 | disabled: boolean;
|
63 | }) => React.ReactElement;
|
64 | |
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 | _internalComponents?: Components;
|
71 | }
|
72 | declare const Menu: React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<MenuRef>>;
|
73 | export default Menu;
|