Files
NapCatQQ/.pnpm-store/v3/files/4e/8be8739af475467a6eb6c1dccae6ba5eca0866b1e24a48992bd33594e358b6295323446cc6e80fac4a284e66a30626833473991131df6f7d655e6bc491a840
T
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

50 lines
1.5 KiB
Plaintext

import { PopoverProps } from '@heroui/popover';
import { MenuTriggerType } from '@react-types/menu';
import { Ref } from 'react';
import { PropGetter, HTMLHeroUIProps } from '@heroui/system';
import { ReactRef } from '@heroui/react-utils';
import { MenuProps } from '@heroui/menu';
interface Props extends HTMLHeroUIProps<"div"> {
/**
* Type of overlay that is opened by the trigger.
*/
type?: "menu" | "listbox";
/**
* Ref to the DOM node.
*/
ref?: ReactRef<HTMLElement | null>;
/**
* How the menu is triggered.
* @default 'press'
*/
trigger?: MenuTriggerType;
/**
* Whether menu trigger is disabled.
* @default false
*/
isDisabled?: boolean;
/**
* Whether the Menu closes when a selection is made.
* @default true
*/
closeOnSelect?: boolean;
}
type UseDropdownProps = Props & Omit<PopoverProps, "children" | "color" | "variant">;
declare function useDropdown(props: UseDropdownProps): UseDropdownReturn;
type UseDropdownReturn = {
Component: string | React.ElementType;
menuRef: React.RefObject<HTMLUListElement>;
menuProps: any;
classNames: string;
closeOnSelect: boolean;
onClose: () => void;
autoFocus: any;
disableAnimation: boolean;
getPopoverProps: PropGetter;
getMenuProps: <T extends object>(props?: Partial<MenuProps<T>>, ref?: Ref<any>) => MenuProps;
getMenuTriggerProps: (props?: any) => any;
};
export { UseDropdownProps, UseDropdownReturn, useDropdown };