@atlaskit/popup
Version:
A popup displays brief content in an overlay.
11 lines (10 loc) • 632 B
TypeScript
import { type Context, type MutableRefObject } from 'react';
/**
* Provides the trigger element as a stable `MutableRefObject<HTMLElement | null>`
* for the top-layer path. Unlike `TriggerRefContext` (which provides
* `HTMLElement | null` as React state and causes a re-render when the trigger
* mounts), this context provides a ref object whose identity is stable across
* renders — allowing `useAnchoredPopover` to receive a stable anchor ref without
* needing to create a new ref wrapper on every `triggerRef` state change.
*/
export declare const TriggerRefObjectContext: Context<MutableRefObject<HTMLElement | null>>;