import * as React from "react"; import { ContentProp, MenuListProps } from "../MenuList/MenuList"; import { ModalCloseReason } from "../Modal"; import { PopoverProps } from "../Popover"; import { Placement } from "@floating-ui/react"; import { AutoPlacement } from "../../hooks/usePlacement"; export type MenuCloseReason = "clickMenuList"; /** * @deprecated このコンポーネントは非推奨です。代わりに `ContextMenu2` を使用してください。 */ export type MenuProps = { isOpen?: boolean; /** * Basis of `` position. */ baseElement?: HTMLElement | null; /** * `type ContentProp = React.ComponentPropsWithoutRef<"div"> & { * text: string; * onClick: () => void; * divideTop?: boolean; * disabled?: boolean; * }` */ contents: ContentProp[]; /** * Define priority of position. Please check [this](https://floating-ui.com/docs/tutorial#placements). * For backward compatibility, `"auto" | "auto-start" | "auto-end"` are included in addition to the above positions. */ positionPriority?: (Placement | AutoPlacement)[]; onClose?: (event: React.MouseEvent, reason: ModalCloseReason | MenuCloseReason) => void; maxHeight?: MenuListProps["maxHeight"]; /** * props of [MenuList](/?path=/docs/components-navigation-menulist) */ menuListProps?: Partial; /** * props of [Popover](/?path=/docs/components-utils-popover) */ popoverProps?: Partial; }; /** * @deprecated このコンポーネントは非推奨です。代わりに `ContextMenu2` を使用してください。 */ declare const Menu: React.ForwardRefExoticComponent>; export default Menu;