import { HelpCircle } from 'lucide-react'; import { ReactNode, useMemo } from 'react'; import sanitize from 'sanitize-html'; import { TooltipWithChildren, Position } from '../TooltipWithChildren'; export interface Props { position?: Position; message: ReactNode; className?: string; setHtmlMessage?: boolean; } export function Tooltip({ message, position = 'bottom', className, setHtmlMessage, }: Props) { // allow angular views to set html messages for the tooltip const htmlMessage = useMemo(() => { if (setHtmlMessage && typeof message === 'string') { // eslint-disable-next-line react/no-danger return
; } return null; }, [setHtmlMessage, message]); return ( ); }