import React, { FC, CSSProperties } from 'react'; import { PopperChildrenProps } from 'react-popper'; type PlacementType = PopperChildrenProps['placement']; export interface PropsType { placement?: PlacementType; show?: boolean; fixed?: boolean; offset?: number; distance?: number; inline?: boolean; stretch?: boolean; preventOverflow?: boolean; triggerOn?: 'click' | 'hover'; arrowStyle?: CSSProperties; onClickOutside?(): void; renderContent(): React.JSX.Element | string; 'data-testid'?: string; } /** * Tooltip component that is positioned around the component it wraps. * This component is based on react-popper, a wrapper around popper.js * [reference](https://github.com/FezVrasta/react-popper) * * @param renderContent * Mandatory prop that contains the contents of the tooltip * @param placement * Defines the location of the tooltip (optional) * @param show * Enables you to manage the visibility of the tooltip * @param fixed * Enable to use the fixed position strategy to position the tooltip * @param offset * Offset the tooltip content-block horzontal or vertical relative to the wrapper element * @param distance * Used to set the distance between the wrapper element and the tooltip * @param inline * If the anchor is in inline text this prop should be used to prevent the text flow from breaking * @param stretch * Used to strech the anchor of the tooltip. By enabling this the anchor grows to the size of the parent of the wrapped component * @param preventOverflow * This is used to prevent the tooltip from being positioned outside the boundary * [reference](https://popper.js.org/popper-documentation.html#modifiers..preventOverflow) * @param arrowStyle * These styles (react css properties) are applied on the arrow of the popover * @param triggerOn * Used to set they way the tooltip is triggered. Can't be used together with show prop. * @param onClickOutside * Function triggered when the user clicks outside of the tooltip. */ declare const Popover: FC>; export default Popover; export { PlacementType };