import React, { useState } from 'react'; import { AlertIcon } from './Icons'; interface ParentCompProps { childComp?: React.ReactNode; description?: string; } export const Tooltip = ({ description, childComp }: ParentCompProps): JSX.Element => { const [open, setOpen] = useState(false); return ( setOpen(true)} onMouseLeave={() => setOpen(false)} > {childComp} {open && (
{description}
)}
); }; interface WarningMessageToolTipProps { mutationCallback: any; setShowPopup: any; text?: string; customPosition?: string; } export const WarningMessageToolTip = ({ mutationCallback, setShowPopup, text, customPosition }: WarningMessageToolTipProps) => { const containerClass = customPosition + 'next-topic-tooltip absolute bg-white rounded text-sm p-4 shadow-sm w-[400px] z-[99999] text-black-light'; return (

{text}

); };