add tooltip portal (#10233)

This commit is contained in:
Josh Hawkins 2024-03-04 07:34:23 -06:00 committed by GitHub
parent c2a537ce22
commit 85ce672b53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,6 +8,7 @@ import {
} from "@/components/ui/tooltip";
import { useState } from "react";
import { isDesktop } from "react-device-detect";
import { TooltipPortal } from "@radix-ui/react-tooltip";
const variants = {
primary: {
@ -61,9 +62,11 @@ export default function NavItem({
<Icon className="size-5 md:m-[6px]" />
</TooltipTrigger>
</NavLink>
<TooltipContent side="right">
<p>{title}</p>
</TooltipContent>
<TooltipPortal>
<TooltipContent side="right">
<p>{title}</p>
</TooltipContent>
</TooltipPortal>
</Tooltip>
)
);