import type { FC, ReactNode } from 'react' import { OverlayTrigger, OverlayTriggerProps, Tooltip as BSTooltip, } from 'react-bootstrap' type OverlayProps = Omit & { shouldUpdatePosition?: boolean // Not officially documented https://stackoverflow.com/a/43138470 } export type TooltipProps = { description: ReactNode id: string overlayProps?: OverlayProps tooltipProps?: BSTooltip.TooltipProps } const Tooltip: FC = ({ id, description, children, tooltipProps, overlayProps, }) => { return ( {description} } {...overlayProps} placement={overlayProps?.placement || 'top'} > {children} ) } export default Tooltip