UNPKG

@atlaskit/popup

Version:

A popup displays brief content in an overlay.

36 lines (35 loc) • 1.61 kB
import React from 'react'; import { type ContentProps, type PopupProps as LegacyPopupProps } from '../types'; type CommonContentPopupProps = Pick<LegacyPopupProps, 'xcss' | 'appearance' | 'boundary' | 'offset' | 'onClose' | 'testId' | 'placement' | 'fallbackPlacements' | 'popupComponent' | 'shouldFlip' | 'rootBoundary' | 'autoFocus' | 'shouldRenderToParent' | 'shouldUseCaptureOnOutsideClick' | 'shouldIgnoreCloseEvent' | 'shouldDisableFocusLock' | 'strategy' | 'zIndex' | 'shouldFitViewport' | 'role' | 'label' | 'titleId'> & { children: (props: ContentProps) => React.ReactNode; /** * ___Use with caution___ * * Disables popper.js GPU acceleration for this popup. * This means only positioning will be used, without any transforms. * * Performance will be degraded if the popup is expected to move. * * This should almost never be used, but is sometimes needed * to resolve layering issues. */ shouldDisableGpuAcceleration?: boolean; }; type ShouldFitContainerContentPopupProps = CommonContentPopupProps & { shouldFitContainer: true; shouldRenderToParent?: true; strategy?: 'absolute'; }; type StandardPopupContentProps = CommonContentPopupProps & { shouldFitContainer?: false; }; export type PopupContentProps = ShouldFitContainerContentPopupProps | StandardPopupContentProps; /** * __Popup content__ * * Popup content is the component that renders the content of the popup. * * It must be a child of the Popup component. */ export declare function PopupContent(props: PopupContentProps): React.ReactNode; export {};