import { FCWithSlotMarker, SlotMarker, WithSlotMarker } from "../utils/types/Slots.js"; import { ForwardRefComponent } from "../utils/polymorphic.js"; import { ButtonProps } from "../Button/types.js"; import { ActionListDividerProps } from "../ActionList/Divider.js"; import { AnchoredOverlayProps } from "../AnchoredOverlay/AnchoredOverlay.js"; import { OverlayProps } from "../Overlay/Overlay.js"; import React from "react"; import { AnchorPosition } from "@primer/behaviors"; //#region src/ActionMenu/ActionMenu.d.ts type ActionMenuProps = { /** * Recommended: `ActionMenu.Button` or `ActionMenu.Anchor` with `ActionMenu.Overlay` */ children: React.ReactElement[] | React.ReactElement; /** * If defined, will control the open/closed state of the overlay. Must be used in conjunction with `onOpenChange`. */ open?: boolean; /** * If defined, will control the open/closed state of the overlay. Must be used in conjunction with `open`. */ onOpenChange?: (s: boolean) => void; } & Pick; type ActionMenuAnchorProps = { children: React.ReactElement; id?: string; } & React.HTMLAttributes; /** this component is syntactical sugar 🍭 */ type ActionMenuButtonProps = ButtonProps; type MenuOverlayProps = Partial & Pick & { /** * Recommended: `ActionList` */ children: React.ReactNode; onPositionChange?: ({ position }: { position: AnchorPosition; }) => void; }; declare const ActionMenu: React.FC> & SlotMarker & { Button: ForwardRefComponent<"button", ButtonProps>; Anchor: WithSlotMarker; id?: string; } & React.HTMLAttributes & React.RefAttributes>>; Overlay: FCWithSlotMarker>; Divider: FCWithSlotMarker>; }; //#endregion export { ActionMenu, ActionMenuAnchorProps, ActionMenuButtonProps, ActionMenuProps };