UNPKG

antd-meck

Version:

An enterprise-class UI design language and React-based implementation

73 lines (72 loc) 2.24 kB
/// <reference types="react" /> import * as React from 'react'; import SubMenu from './SubMenu'; import Item from './MenuItem'; export interface SelectParam { key: string; keyPath: Array<string>; item: any; domEvent: any; selectedKeys: Array<string>; } export interface ClickParam { key: string; keyPath: Array<string>; item: any; domEvent: any; } export interface MenuProps { id?: string; theme?: 'light' | 'dark'; mode?: 'vertical' | 'vertical-left' | 'vertical-right' | 'horizontal' | 'inline'; selectable?: boolean; selectedKeys?: Array<string>; defaultSelectedKeys?: Array<string>; openKeys?: Array<string>; defaultOpenKeys?: Array<string>; onOpenChange?: (openKeys: string[]) => void; onSelect?: (param: SelectParam) => void; onDeselect?: (param: SelectParam) => void; onClick?: (param: ClickParam) => void; style?: React.CSSProperties; openAnimation?: string | Object; openTransitionName?: string | Object; className?: string; prefixCls?: string; multiple?: boolean; inlineIndent?: number; inlineCollapsed?: boolean; } export default class Menu extends React.Component<MenuProps, any> { static Divider: any; static Item: typeof Item; static SubMenu: typeof SubMenu; static ItemGroup: any; static defaultProps: { prefixCls: string; className: string; theme: string; }; static childContextTypes: { inlineCollapsed: any; antdMenuTheme: any; }; static contextTypes: { siderCollapsed: any; }; switchModeFromInline: boolean; inlineOpenKeys: never[]; constructor(props: any); getChildContext(): { inlineCollapsed: any; antdMenuTheme: "light" | "dark" | undefined; }; componentWillReceiveProps(nextProps: any, nextContext: any): void; handleClick: (e: any) => void; handleOpenChange: (openKeys: string[]) => void; setOpenKeys(openKeys: any): void; getRealMenuMode(): "vertical" | "horizontal" | "inline" | "vertical-left" | "vertical-right" | undefined; getInlineCollapsed(): any; getMenuOpenAnimation(menuMode: any): string | Object | undefined; render(): JSX.Element; }