/**
* @file MenuItem
* @description 导航项目
* @author fex
*/
///
import React from 'react';
import { MenuItemProps as RcMenuItemProps } from 'rc-menu';
import { ClassNamesFn } from 'amis-core';
import { Trigger } from '../TooltipWrapper';
import { MenuContextProps } from './MenuContext';
import type { NavigationItem } from './';
export interface MenuItemProps extends Omit, RcMenuItemProps {
depth?: number;
icon?: string | React.ReactNode;
children?: React.ReactNode;
classPrefix: string;
classnames: ClassNamesFn;
tooltipClassName?: string;
tooltipContainer?: HTMLElement | (() => HTMLElement);
tooltipTrigger?: Trigger | Array;
renderLink: Function;
testid?: string;
extra?: React.ReactNode;
}
export declare class MenuItem extends React.Component {
static defaultProps: Pick;
static contextType: React.Context;
/**
* Menu上下文数据
*
* @type {MenuContextProps}
* @memberof MenuItem
*/
context: MenuContextProps;
/**
* 内部使用的属性
*
* @memberof MenuItem
*/
internalProps: string[];
/** 检查icon参数值是否为文件路径 */
isImgPath(raw: string): boolean;
renderMenuItem(): React.JSX.Element;
render(): React.JSX.Element | null;
}
declare const _default: {
new (props: Omit & import("packages/amis-core/lib/theme").ThemeOuterProps): {
ref: any;
childRef(ref: any): void;
getWrappedInstance(): any;
render(): React.JSX.Element;
context: unknown;
setState(state: {} | ((prevState: Readonly<{}>, props: Readonly & import("packages/amis-core/lib/theme").ThemeOuterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
readonly props: Readonly & import("packages/amis-core/lib/theme").ThemeOuterProps>;
state: Readonly<{}>;
refs: {
[key: string]: React.ReactInstance;
};
componentDidMount?(): void;
shouldComponentUpdate?(nextProps: Readonly & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
componentWillUnmount?(): void;
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
};
displayName: string;
contextType: React.Context;
ComposedComponent: React.ComponentType;
} & import("hoist-non-react-statics").NonReactStatics & {
ComposedComponent: typeof MenuItem;
};
export default _default;