import React, { ReactNode } from 'react'; import { Cauldron } from '../../types'; import AnchoredOverlay from '../AnchoredOverlay'; export type PopoverVariant = 'prompt' | 'custom'; type BaseProps = React.HTMLAttributes & { target: React.RefObject | HTMLElement; variant?: PopoverVariant; show: boolean; onClose: () => void; placement?: React.ComponentProps['placement']; /** Render the popover in a different location in the dom. */ portal?: React.RefObject | HTMLElement; }; type CustomProps = BaseProps & { variant: 'custom'; applyButtonText?: string; onApply?: () => void; closeButtonText?: string; infoText?: ReactNode; children: ReactNode; } & Cauldron.LabelProps; type PromptProps = BaseProps & { variant: 'prompt'; applyButtonText?: string; onApply: () => void; closeButtonText?: string; infoText: ReactNode; children?: ReactNode; }; export type PopoverProps = PromptProps | CustomProps; declare const Popover: React.ForwardRefExoticComponent>; export default Popover;