UNPKG

671 BTypeScriptView Raw
1import * as React from 'react';
2import { MenuItemProps as RcMenuItemProps } from 'rc-menu';
3import { MenuContextProps } from './MenuContext';
4import { SiderContextProps } from '../layout/Sider';
5export interface MenuItemProps extends Omit<RcMenuItemProps, 'title'> {
6 icon?: React.ReactNode;
7 danger?: boolean;
8 title?: React.ReactNode;
9}
10export default class MenuItem extends React.Component<MenuItemProps> {
11 static contextType: React.Context<MenuContextProps>;
12 context: MenuContextProps;
13 renderItemChildren(inlineCollapsed: boolean): JSX.Element;
14 renderItem: ({ siderCollapsed }: SiderContextProps) => JSX.Element;
15 render(): JSX.Element;
16}