import { default as React } from 'react'; import { FloatingPortalProps, Placement } from '@floating-ui/react'; import { PopoverHeaderProps } from '../ComponentTypes.models'; type ChildrenProp = ({ setVisible, visible, floatingRef, }: { setVisible: React.Dispatch>; visible: boolean; floatingRef: React.MutableRefObject; }) => React.JSX.Element; export type PopoverProps = { /** The element that needs to be clicked to open the popover */ children: ChildrenProp; /** The content inside the popover */ popoverContent: ChildrenProp | React.JSX.Element; /** Optional className added to the popover */ className?: string; /** Function that is called on blur of the popover */ onClickOutside?: () => void; /** Optional PopoverHeader props available */ header?: PopoverHeaderProps; /** Optional `noPadding` prop is used to remove the padding of the content. */ noPadding?: boolean; /** Optional placement prop for the popover */ position?: Placement | 'auto' | 'auto-start' | 'auto-end'; /** Optional prop to restrict the max width of the popover */ maxWidth?: string; /** Optional element to append the popover to */ appendTo?: FloatingPortalProps['root'] | 'parent'; /** Optional prop to disable the popover */ disabled?: boolean; /** Optional prop to set the color of the arrow */ /** * @deprecated This prop is no longer supported. **/ arrowColor?: 'medium-purple' | 'dark-red' | 'dark-green' | 'dark-blue' | 'lighter-gray' | 'white'; /** Optional prop to disable closing the Popover on scrolling */ disableCloseOnScroll?: boolean; /** Optional prop to add a test id to the popover for QA testing */ qaTestId?: string; }; declare const Popover: ({ children, popoverContent, position, className, onClickOutside, header, noPadding, maxWidth, appendTo, disabled, disableCloseOnScroll, qaTestId, }: PopoverProps) => React.JSX.Element; export default Popover;