mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 06:03:38 +08:00
Co-authored-by: Egor Miasniankin <egormyasnyankin@gmail.com>
This commit is contained in:
parent
f801318868
commit
87ee19e698
@ -28,12 +28,12 @@ type GenericProps<T = unknown> = T extends infer U extends MenuItemProps
|
||||
: U
|
||||
: MenuItemProps;
|
||||
|
||||
interface GenericComponent extends Omit<MenuItemComponent, ''> {
|
||||
type GenericComponent = Omit<MenuItemComponent, ''> & {
|
||||
<T extends MenuItemProps>(
|
||||
props: GenericProps<T>,
|
||||
...args: RestArgs<MenuItemComponent>
|
||||
): ReturnType<MenuItemComponent>;
|
||||
}
|
||||
};
|
||||
|
||||
const MenuItem: GenericComponent = (props) => {
|
||||
const { className, children, icon, title, danger } = props;
|
||||
|
Loading…
Reference in New Issue
Block a user