import React, { ReactNode } from 'react' import Tippy from '@tippyjs/react' import 'tippy.js/animations/scale.css' type TooltipProps = { content: ReactNode placement?: any className?: string children?: ReactNode } const Tooltip = ({ children, content, className, placement = 'top', }: TooltipProps) => { return ( document.body} maxWidth="20rem" interactive content={
{content}
} >
{children}
) } const Content = ({ className = '', children }) => { return (
{children}
) } Tooltip.Content = Content export default Tooltip