You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
InternshipProject/node_modules/rc-menu/lib/Menu.d.ts

57 lines
2.3 KiB

import * as React from 'react';
import type { CSSMotionProps } from 'rc-motion';
import type { BuiltinPlacements, MenuClickEventHandler, MenuMode, SelectEventHandler, TriggerSubMenuAction, RenderIconType } from './interface';
export interface MenuProps extends Omit<React.HTMLAttributes<HTMLUListElement>, 'onClick' | 'onSelect' | 'dir'> {
prefixCls?: string;
children?: React.ReactNode;
disabled?: boolean;
/** @private Disable auto overflow. Pls note the prop name may refactor since we do not final decided. */
disabledOverflow?: boolean;
/** direction of menu */
direction?: 'ltr' | 'rtl';
mode?: MenuMode;
inlineCollapsed?: boolean;
defaultOpenKeys?: string[];
openKeys?: string[];
activeKey?: string;
defaultActiveFirst?: boolean;
selectable?: boolean;
multiple?: boolean;
defaultSelectedKeys?: string[];
selectedKeys?: string[];
onSelect?: SelectEventHandler;
onDeselect?: SelectEventHandler;
inlineIndent?: number;
/** Menu motion define. Use `defaultMotions` if you need config motion of each mode */
motion?: CSSMotionProps;
/** Default menu motion of each mode */
defaultMotions?: Partial<{
[key in MenuMode | 'other']: CSSMotionProps;
}>;
subMenuOpenDelay?: number;
subMenuCloseDelay?: number;
forceSubMenuRender?: boolean;
triggerSubMenuAction?: TriggerSubMenuAction;
builtinPlacements?: BuiltinPlacements;
itemIcon?: RenderIconType;
expandIcon?: RenderIconType;
overflowedIndicator?: React.ReactNode;
/** @private Internal usage. Do not use in your production. */
overflowedIndicatorPopupClassName?: string;
getPopupContainer?: (node: HTMLElement) => HTMLElement;
onClick?: MenuClickEventHandler;
onOpenChange?: (openKeys: string[]) => void;
/***
* @private Only used for `pro-layout`. Do not use in your prod directly
* and we do not promise any compatibility for this.
*/
_internalRenderMenuItem?: (originNode: React.ReactElement, menuItemProps: any) => React.ReactElement;
/***
* @private Only used for `pro-layout`. Do not use in your prod directly
* and we do not promise any compatibility for this.
*/
_internalRenderSubMenuItem?: (originNode: React.ReactElement, subMenuItemProps: any) => React.ReactElement;
}
declare const Menu: React.FC<MenuProps>;
export default Menu;