import React from 'react'; import * as Tooltip from '@radix-ui/react-tooltip'; import type {ReactNode} from 'react'; interface ToolTipProps { tooltip: string, children: ReactNode | ReactNode[]; sideOffset?: number, className?: string, arrowClassName?: string, tooltipStyle?: any, //TODO better type } const WithTooltip = ({ tooltip, children, sideOffset = 5, className = '', arrowClassName = '', tooltipStyle = {} }: ToolTipProps) => { return ( {children} {tooltip} ); }; export default WithTooltip;