2023-10-31 06:44:06 +00:00
|
|
|
// FIXME: fix this!!!
|
2023-10-19 09:54:51 +00:00
|
|
|
import { Placement } from "@blueprintjs/popover2";
|
|
|
|
|
|
|
|
export interface IDropdownProps {
|
|
|
|
customButtonClassName?: string;
|
2024-02-08 06:19:00 +00:00
|
|
|
customButtonTabIndex?: number;
|
2023-10-19 09:54:51 +00:00
|
|
|
buttonClassName?: string;
|
|
|
|
className?: string;
|
|
|
|
customButton?: JSX.Element;
|
|
|
|
disabled?: boolean;
|
|
|
|
input?: boolean;
|
|
|
|
label?: string | JSX.Element;
|
|
|
|
maxHeight?: "sm" | "rg" | "md" | "lg";
|
|
|
|
noChevron?: boolean;
|
|
|
|
onOpen?: () => void;
|
|
|
|
optionsClassName?: string;
|
|
|
|
placement?: Placement;
|
2024-01-10 06:51:24 +00:00
|
|
|
tabIndex?: number;
|
2023-10-19 09:54:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICustomMenuDropdownProps extends IDropdownProps {
|
|
|
|
children: React.ReactNode;
|
|
|
|
ellipsis?: boolean;
|
|
|
|
noBorder?: boolean;
|
|
|
|
verticalEllipsis?: boolean;
|
|
|
|
menuButtonOnClick?: (...args: any) => void;
|
2024-03-01 11:53:26 +00:00
|
|
|
menuItemsClassName?: string;
|
2024-02-08 06:19:00 +00:00
|
|
|
onMenuClose?: () => void;
|
2024-01-11 12:49:19 +00:00
|
|
|
closeOnSelect?: boolean;
|
|
|
|
portalElement?: Element | null;
|
2023-10-19 09:54:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICustomSelectProps extends IDropdownProps {
|
|
|
|
children: React.ReactNode;
|
|
|
|
value: any;
|
|
|
|
onChange: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface CustomSearchSelectProps {
|
|
|
|
footerOption?: JSX.Element;
|
|
|
|
onChange: any;
|
2024-01-23 15:15:44 +00:00
|
|
|
onClose?: () => void;
|
2023-10-19 09:54:51 +00:00
|
|
|
options:
|
|
|
|
| {
|
|
|
|
value: any;
|
|
|
|
query: string;
|
|
|
|
content: React.ReactNode;
|
|
|
|
}[]
|
|
|
|
| undefined;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface SingleValueProps {
|
|
|
|
multiple?: false;
|
|
|
|
value: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface MultipleValuesProps {
|
|
|
|
multiple?: true;
|
|
|
|
value: any[] | null;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type ICustomSearchSelectProps = IDropdownProps &
|
|
|
|
CustomSearchSelectProps &
|
|
|
|
(SingleValueProps | MultipleValuesProps);
|
|
|
|
|
|
|
|
export interface ICustomMenuItemProps {
|
|
|
|
children: React.ReactNode;
|
2024-02-28 11:23:26 +00:00
|
|
|
disabled?: boolean;
|
2023-10-19 09:54:51 +00:00
|
|
|
onClick?: (args?: any) => void;
|
|
|
|
className?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICustomSelectItemProps {
|
|
|
|
children: React.ReactNode;
|
|
|
|
value: any;
|
|
|
|
className?: string;
|
|
|
|
}
|