mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-26 09:36:33 +01:00
39 lines
967 B
TypeScript
39 lines
967 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;
|
|
ariaHasPopup?:
|
|
| boolean
|
|
| 'dialog'
|
|
| 'menu'
|
|
| 'true'
|
|
| 'false'
|
|
| 'listbox'
|
|
| 'tree'
|
|
| 'grid'
|
|
| undefined;
|
|
ariaControls?: string;
|
|
ariaLabel?: string;
|
|
ariaChecked?: boolean;
|
|
ref?: React.Ref<any>;
|
|
className?: string;
|
|
render?:
|
|
| RenderProp<React.HTMLAttributes<any> & { ref?: React.Ref<any> | undefined }>
|
|
| React.ReactElement<any, string | React.JSXElementConstructor<any>>
|
|
| undefined;
|
|
subItems?: MenuItemProps[];
|
|
}
|