From c80b0873164f444fffaa52f5740112599a46bf44 Mon Sep 17 00:00:00 2001 From: Konstantin Wohlwend Date: Thu, 4 Jun 2026 11:19:41 -0700 Subject: [PATCH] Self-wrap TooltipProvider --- .../src/components/pill-toggle.tsx | 140 +++++++++--------- packages/ui/src/components/simple-tooltip.tsx | 44 +++--- 2 files changed, 94 insertions(+), 90 deletions(-) diff --git a/packages/dashboard-ui-components/src/components/pill-toggle.tsx b/packages/dashboard-ui-components/src/components/pill-toggle.tsx index 4f42985fa..e2e11ea9c 100644 --- a/packages/dashboard-ui-components/src/components/pill-toggle.tsx +++ b/packages/dashboard-ui-components/src/components/pill-toggle.tsx @@ -1,7 +1,7 @@ "use client"; import { useState } from "react"; -import { cn, Spinner, Tooltip, TooltipContent, TooltipTrigger } from "@hexclave/ui"; +import { cn, Spinner, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@hexclave/ui"; import { TooltipPortal } from "@radix-ui/react-tooltip"; import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises"; import { useGlassmorphicDefault } from "./card"; @@ -82,76 +82,78 @@ export function DesignPillToggle({ }; return ( -
- {options.map((option) => { - const isActive = selected === option.id; - const Icon = option.icon; + +
+ {options.map((option) => { + const isActive = selected === option.id; + const Icon = option.icon; - const pill = ( - - ); - - if (!showLabels) { - return ( - - - {pill} - - - - {option.label} - - - + const pill = ( + ); - } - return pill; - })} -
+ if (!showLabels) { + return ( + + + {pill} + + + + {option.label} + + + + ); + } + + return pill; + })} +
+ ); } diff --git a/packages/ui/src/components/simple-tooltip.tsx b/packages/ui/src/components/simple-tooltip.tsx index 9f69f69aa..9c5842b1b 100644 --- a/packages/ui/src/components/simple-tooltip.tsx +++ b/packages/ui/src/components/simple-tooltip.tsx @@ -1,6 +1,6 @@ import { TooltipPortal } from "@radix-ui/react-tooltip"; import { CircleAlert, Info } from "lucide-react"; -import { Tooltip, TooltipContent, TooltipTrigger, cn } from ".."; +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, cn } from ".."; export function SimpleTooltip(props: { tooltip: React.ReactNode, @@ -22,25 +22,27 @@ export function SimpleTooltip(props: { ); return ( - - - {props.inline ? ( - - {trigger} - - ) : ( -
- {trigger} -
- )} -
- {props.tooltip && - -
- {props.tooltip} -
-
-
} -
+ + + + {props.inline ? ( + + {trigger} + + ) : ( +
+ {trigger} +
+ )} +
+ {props.tooltip && + +
+ {props.tooltip} +
+
+
} +
+
); }