MenuItem.d.ts
2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import * as React from 'react';
import { noop } from './util';
import { SelectEventHandler, HoverEventHandler, DestroyEventHandler, RenderIconType, MenuHoverEventHandler, MenuClickEventHandler, MenuMode, LegacyFunctionRef } from './interface';
export interface MenuItemProps extends Omit<React.HTMLAttributes<HTMLLIElement>, 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onSelect'> {
/** @deprecated No place to use this. Should remove */
attribute?: Record<string, string>;
rootPrefixCls?: string;
eventKey?: React.Key;
className?: string;
style?: React.CSSProperties;
active?: boolean;
children?: React.ReactNode;
selectedKeys?: string[];
disabled?: boolean;
title?: string;
onItemHover?: HoverEventHandler;
onSelect?: SelectEventHandler;
onClick?: MenuClickEventHandler;
onDeselect?: SelectEventHandler;
parentMenu?: React.ReactInstance;
onDestroy?: DestroyEventHandler;
onMouseEnter?: MenuHoverEventHandler;
onMouseLeave?: MenuHoverEventHandler;
multiple?: boolean;
isSelected?: boolean;
manualRef?: LegacyFunctionRef;
itemIcon?: RenderIconType;
role?: string;
mode?: MenuMode;
inlineIndent?: number;
level?: number;
direction?: 'ltr' | 'rtl';
}
export declare class MenuItem extends React.Component<MenuItemProps> {
static isMenuItem: boolean;
static defaultProps: {
onSelect: typeof noop;
onMouseEnter: typeof noop;
onMouseLeave: typeof noop;
manualRef: typeof noop;
};
node: HTMLLIElement;
componentDidMount(): void;
componentDidUpdate(): void;
componentWillUnmount(): void;
onKeyDown: (e: React.KeyboardEvent<HTMLElement>) => boolean | undefined;
onMouseLeave: React.MouseEventHandler<HTMLElement>;
onMouseEnter: React.MouseEventHandler<HTMLElement>;
onClick: React.MouseEventHandler<HTMLElement>;
getPrefixCls(): string;
getActiveClassName(): string;
getSelectedClassName(): string;
getDisabledClassName(): string;
saveNode: (node: HTMLLIElement) => void;
callRef(): void;
render(): JSX.Element;
}
declare const connected: any;
export default connected;