diff --git a/packages/ui/src/core/tooltip-v2/tooltip-v2.component.tsx b/packages/ui/src/core/tooltip-v2/tooltip-v2.component.tsx index 3befa47e..4b415544 100644 --- a/packages/ui/src/core/tooltip-v2/tooltip-v2.component.tsx +++ b/packages/ui/src/core/tooltip-v2/tooltip-v2.component.tsx @@ -14,6 +14,7 @@ const TooltipV2 = intrinsicComponent( arrow = true, warning = false, enableHover = true, + hide = false, enterDelay = 0, leaveDelay = 0, offsetX = 0, @@ -26,24 +27,28 @@ const TooltipV2 = intrinsicComponent( ...rest }: TooltipV2Props, ref - ): JSX.Element => ( - {title}} - interactive={enableHover} - arrow={arrow} - delay={[enterDelay, leaveDelay]} - $variant={(warning && Variant.Warning) || (info && Variant.Info) || variant} - $size={size || Size.Sm} - animation="scale" - offset={[offsetX, offsetY]} - appendTo={document.body} - {...rest} - > - {children} - - ) + ): JSX.Element => { + if (hide) return children; + + return ( + {title}} + interactive={enableHover} + arrow={arrow} + delay={[enterDelay, leaveDelay]} + $variant={(warning && Variant.Warning) || (info && Variant.Info) || variant} + $size={size || Size.Sm} + animation="scale" + offset={[offsetX, offsetY]} + appendTo={document.body} + {...rest} + > + {children} + + ); + } ); export default TooltipV2; diff --git a/packages/ui/src/core/tooltip-v2/tooltip-v2.props.ts b/packages/ui/src/core/tooltip-v2/tooltip-v2.props.ts index a0af7bcd..fe280595 100644 --- a/packages/ui/src/core/tooltip-v2/tooltip-v2.props.ts +++ b/packages/ui/src/core/tooltip-v2/tooltip-v2.props.ts @@ -14,6 +14,7 @@ export interface TooltipV2Props extends Omit