import React from "react"; import { MarginProps } from "styled-system"; import { PopoverMenuProps } from "../../__internal__/popover-menu"; import { TagProps } from "../../__internal__/utils/helpers/tags"; import { Alignment } from "./__internal__/action-popover.context"; export interface RenderButtonProps { tabIndex: number; "data-element": string; ref?: React.Ref; ariaAttributes: { "aria-haspopup"?: string; "aria-label"?: string; "aria-labelledby"?: string; "aria-describedby"?: string; "aria-controls"?: string; "aria-expanded"?: string; }; size?: PopoverMenuProps["size"]; } export interface ActionPopoverProps extends MarginProps, TagProps { /** Children for popover component */ children?: React.ReactNode; /** @deprecated This prop is no longer supported and has no effect. */ horizontalAlignment?: Alignment; /** @deprecated This prop is no longer supported and has no effect. */ submenuPosition?: Alignment; /** Unique ID */ id?: string; /** Callback to be called on menu open */ onOpen?: () => void; /** Callback to be called on menu close */ onClose?: () => void; /** @deprecated This prop will be removed in a future release. */ placement?: "bottom" | "top"; /** Render a custom menu button to override default ellipsis icon */ renderButton?: (buttonProps: RenderButtonProps) => React.ReactNode; /** Boolean to control whether menu should align to right */ rightAlignMenu?: boolean; /** Prop to specify an aria-label for the component */ "aria-label"?: string; /** Prop to specify an aria-labelledby for the component */ "aria-labelledby"?: string; /** Prop to specify an aria-describedby for the component */ "aria-describedby"?: string; /** * Content for the action popover button. */ buttonLabel?: React.ReactNode; /** * Size of the action popover menu items. */ size?: PopoverMenuProps["size"]; } export type ActionPopoverHandle = { focusButton: () => void; } | null; export declare const ActionPopover: React.ForwardRefExoticComponent>; export default ActionPopover;