import { InformationCircleIcon } from "@heroicons/react/24/outline"; import ReactDOM from "react-dom"; import { StyledTooltip } from "."; const InfoHover = ({ msg }: { msg: string }) => { const id = `info-hover-${encodeURIComponent(msg)}`; const tooltipPortalDiv = document.getElementById("tooltip-portal-div"); return ( <> {tooltipPortalDiv && ReactDOM.createPortal( {msg} , tooltipPortalDiv )} ); }; export default InfoHover;