mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 00:29:12 +08:00
b62b81958b
* fix: try to fix React 18.3 warning * chore: back of ci * chore: fix type * chore: fix lint * chore: update deps * fix: component error * test: update snapshot * test: update snapshot * test: update snapshot * test: update snapshot * test: update snapshot * chore: update deps * test: update snapshot * test: update snapshot * test: update snapshot * chore: update deps * test: update snapshot * test: update snapshot * test: update snapshot * chore: bump version
38 lines
934 B
TypeScript
38 lines
934 B
TypeScript
import type {
|
|
MenuDividerType as RcMenuDividerType,
|
|
MenuItemGroupType as RcMenuItemGroupType,
|
|
MenuItemType as RcMenuItemType,
|
|
SubMenuType as RcSubMenuType,
|
|
} from 'rc-menu/lib/interface';
|
|
|
|
export interface MenuItemType extends RcMenuItemType {
|
|
danger?: boolean;
|
|
icon?: React.ReactNode;
|
|
title?: string;
|
|
}
|
|
|
|
export interface SubMenuType<T extends MenuItemType = MenuItemType>
|
|
extends Omit<RcSubMenuType, 'children'> {
|
|
icon?: React.ReactNode;
|
|
theme?: 'dark' | 'light';
|
|
children: ItemType<T>[];
|
|
}
|
|
|
|
export interface MenuItemGroupType<T extends MenuItemType = MenuItemType>
|
|
extends Omit<RcMenuItemGroupType, 'children'> {
|
|
children?: ItemType<T>[];
|
|
key?: React.Key;
|
|
}
|
|
|
|
export interface MenuDividerType extends RcMenuDividerType {
|
|
dashed?: boolean;
|
|
key?: React.Key;
|
|
}
|
|
|
|
export type ItemType<T extends MenuItemType = MenuItemType> =
|
|
| T
|
|
| SubMenuType<T>
|
|
| MenuItemGroupType<T>
|
|
| MenuDividerType
|
|
| null;
|