2022-11-15 23:50:54 -05:00
|
|
|
import Card from "@components/card"
|
2022-11-12 21:39:03 -05:00
|
|
|
import * as RadixTooltip from "@radix-ui/react-tooltip"
|
|
|
|
import "./tooltip.css"
|
|
|
|
|
|
|
|
const Tooltip = ({
|
|
|
|
children,
|
|
|
|
content,
|
|
|
|
className,
|
|
|
|
...props
|
|
|
|
}: {
|
|
|
|
children: React.ReactNode
|
|
|
|
content: React.ReactNode
|
|
|
|
className?: string
|
|
|
|
} & RadixTooltip.TooltipProps) => {
|
|
|
|
return (
|
|
|
|
<RadixTooltip.Root {...props}>
|
2022-11-15 23:50:54 -05:00
|
|
|
<RadixTooltip.Trigger asChild className={className}>
|
|
|
|
{children}
|
|
|
|
</RadixTooltip.Trigger>
|
2022-11-12 21:39:03 -05:00
|
|
|
|
|
|
|
<RadixTooltip.Content>
|
2022-11-15 23:50:54 -05:00
|
|
|
<Card className="tooltip">{content}</Card>
|
2022-11-12 21:39:03 -05:00
|
|
|
</RadixTooltip.Content>
|
|
|
|
</RadixTooltip.Root>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Tooltip
|