UNPKG

815 BTypeScriptView Raw
1import type { OverlayLifecycleProps } from "../overlay/overlay";
2import type { PopoverProps } from "../popover/popover";
3export type Offset = {
4 left: number;
5 top: number;
6};
7/**
8 * A limited subset of props to forward along to the context menu popover overlay.
9 *
10 * Overriding `placement` is not recommended, as users expect context menus to open towards the bottom right
11 * of their cursor, which is the default placement. However, this option is provided to help with rare cases where
12 * the menu is triggered at the bottom and/or right edge of a window and the built-in popover flipping behavior does
13 * not work effectively.
14 */
15export type ContextMenuPopoverOptions = OverlayLifecycleProps & Pick<PopoverProps, "placement" | "popoverClassName" | "transitionDuration" | "popoverRef" | "rootBoundary">;