mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-16 23:21:00 +08:00

* chore: upgrade RC component dependencies
* chore: trigger CI build
* chore: update deps and import path
* chore: update deps
* test: update snapshot
* test: update snapshot
* fix: lint fix
* chore: migrate Drawer to @rc-component/drawer
* chore: migrate Image to @rc-component/image
* test: update snapshot
* chore: replace api
* fix cascader dropdown api and snap, popupAlign
* fix ci test
* fix key
* test: update snapshot
* Revert "test: update snapshot"
This reverts commit 66a993332b
.
* chore: fix logic
* test: update snapshot
* chore: revert part logic
---------
Signed-off-by: Jony J <1844749591@qq.com>
Co-authored-by: thinkasany <480968828@qq.com>
Co-authored-by: 二货机器人 <smith3816@gmail.com>
38 lines
945 B
TypeScript
38 lines
945 B
TypeScript
import type {
|
|
MenuDividerType as RcMenuDividerType,
|
|
MenuItemGroupType as RcMenuItemGroupType,
|
|
MenuItemType as RcMenuItemType,
|
|
SubMenuType as RcSubMenuType,
|
|
} from '@rc-component/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;
|