mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
25 lines
698 B
TypeScript
25 lines
698 B
TypeScript
|
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||
|
|
export type RenderProp<
|
||
|
|
P = React.HTMLAttributes<any> & {
|
||
|
|
ref?: React.Ref<any>;
|
||
|
|
},
|
||
|
|
> = (props: P) => React.ReactNode;
|
||
|
|
|
||
|
|
export interface MenuItemProps {
|
||
|
|
id?: string;
|
||
|
|
label?: string;
|
||
|
|
onClick?: (e: React.MouseEvent<HTMLButtonElement | HTMLDivElement>) => void;
|
||
|
|
icon?: React.ReactNode;
|
||
|
|
kbd?: string;
|
||
|
|
show?: boolean;
|
||
|
|
disabled?: boolean;
|
||
|
|
separate?: boolean;
|
||
|
|
hideOnClick?: boolean;
|
||
|
|
dialog?: React.ReactElement;
|
||
|
|
ref?: React.Ref<any>;
|
||
|
|
render?:
|
||
|
|
| RenderProp<React.HTMLAttributes<any> & { ref?: React.Ref<any> | undefined }>
|
||
|
|
| React.ReactElement<any, string | React.JSXElementConstructor<any>>
|
||
|
|
| undefined;
|
||
|
|
}
|