improvement: disable tooltip hover content for env name tooltip

This commit is contained in:
Scott Wilson
2025-06-26 09:12:11 -07:00
parent 5d30215ea7
commit e8d19eb823
2 changed files with 7 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
import { ReactNode } from "react";
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
import { TooltipProps as RootProps } from "@radix-ui/react-tooltip";
import { twMerge } from "tailwind-merge";
export type TooltipProps = Omit<TooltipPrimitive.TooltipContentProps, "open" | "content"> & {
@@ -14,6 +15,7 @@ export type TooltipProps = Omit<TooltipPrimitive.TooltipContentProps, "open" | "
isDisabled?: boolean;
center?: boolean;
size?: "sm" | "md";
rootProps?: RootProps;
};
export const Tooltip = ({
@@ -28,12 +30,14 @@ export const Tooltip = ({
isDisabled,
position = "top",
size = "md",
rootProps,
...props
}: TooltipProps) =>
// just render children if tooltip content is empty
content ? (
<TooltipPrimitive.Root
delayDuration={50}
{...rootProps}
open={isOpen}
defaultOpen={defaultOpen}
onOpenChange={onOpenChange}

View File

@@ -1291,6 +1291,9 @@ export const OverviewPage = () => {
sideOffset={-1}
align="end"
className="max-w-xl text-xs normal-case"
rootProps={{
disableHoverableContent: true
}}
>
<div
className={twMerge(