diff --git a/app/components/ui/Tooltip.tsx b/app/components/ui/Tooltip.tsx index 73ababb3a..4e22f540c 100644 --- a/app/components/ui/Tooltip.tsx +++ b/app/components/ui/Tooltip.tsx @@ -1,14 +1,15 @@ -import React from 'react'; import * as Tooltip from '@radix-ui/react-tooltip'; -import type { ReactNode } from 'react'; -interface ToolTipProps { - tooltip: string; - children: ReactNode | ReactNode[]; +interface TooltipProps { + tooltip: React.ReactNode; + children: React.ReactNode; sideOffset?: number; className?: string; arrowClassName?: string; - tooltipStyle?: any; //TODO better type + tooltipStyle?: React.CSSProperties; + position?: 'top' | 'bottom' | 'left' | 'right'; + maxWidth?: number; + delay?: number; } const WithTooltip = ({ @@ -18,18 +19,51 @@ const WithTooltip = ({ className = '', arrowClassName = '', tooltipStyle = {}, -}: ToolTipProps) => { + position = 'top', + maxWidth = 250, + delay = 0, +}: TooltipProps) => { return ( - + {children} - {tooltip} - +
{tooltip}
+