From f0874862f0db0d72812006653cd69818248e5ffc Mon Sep 17 00:00:00 2001 From: SaelixCode Date: Fri, 3 Jul 2026 15:31:51 -0400 Subject: [PATCH] fix: replace custom tooltip with shadcn/ui Radix tooltip Replaced the glass/blur-styled tooltip with the standard shadcn/ui pattern: bg-foreground/text-background, arrow pointer, proper slide/fade animations, and w-fit max-w-xs sizing. This gives all tooltips a consistent dark-solid look across the entire app. --- frontend/src/components/ui/tooltip.tsx | 82 ++++++++++++++++---------- 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/frontend/src/components/ui/tooltip.tsx b/frontend/src/components/ui/tooltip.tsx index e0441e1b..5232e2c4 100644 --- a/frontend/src/components/ui/tooltip.tsx +++ b/frontend/src/components/ui/tooltip.tsx @@ -1,36 +1,56 @@ -'use client'; +"use client" -import * as React from 'react'; -import * as TooltipPrimitive from '@radix-ui/react-tooltip'; -import { cn } from '@/lib/utils'; +import * as React from "react" +import * as TooltipPrimitive from "@radix-ui/react-tooltip" +import { cn } from "@/lib/utils" -// Use Radix primitives directly to avoid animate-ui context dependencies -// that can cause crashes in certain component tree configurations. -const TooltipProvider = TooltipPrimitive.Provider; -const Tooltip = TooltipPrimitive.Root; -const TooltipTrigger = TooltipPrimitive.Trigger; - -const TooltipContent = React.forwardRef< - HTMLDivElement, - React.ComponentProps ->(({ className, sideOffset = 4, ...props }, ref) => ( - - ) { + return ( + - -)); -TooltipContent.displayName = 'TooltipContent'; + ) +} -export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }; +function Tooltip({ + ...props +}: React.ComponentProps) { + return +} + +function TooltipTrigger({ + ...props +}: React.ComponentProps) { + return +} + +function TooltipContent({ + className, + sideOffset = 0, + children, + ...props +}: React.ComponentProps) { + return ( + + + {children} + + + + ) +} + +export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }