import Tippy from '@tippyjs/react' import classNames from 'classnames' import { ReactNode } from 'react' import { Questionmark } from 'components/Icons' import useStore from 'store' import TooltipContent from 'components/Tooltip/TooltipContent' interface Props { content: ReactNode | string type: TooltipType children?: ReactNode | string className?: string delay?: number interactive?: boolean underline?: boolean } export type TooltipType = 'info' | 'warning' | 'error' export const Tooltip = (props: Props) => { const enableAnimations = useStore((s) => s.enableAnimations) return ( document.querySelector('dialog[open]') ?? document.body} interactive={props.interactive} animation={false} delay={[props.delay ?? 0, 0]} render={() => } > {props.children ? ( {props.children} ) : ( )} ) }