fix: use tooltip portal (#5889)
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>pull/5700/head^2
parent
10d3b5f1b9
commit
a9117c2d36
|
@ -5,8 +5,7 @@ import { Icon } from "react-feather";
|
|||
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
import { applyStyleToMultipleVariants } from "@calcom/lib/cva";
|
||||
|
||||
import Tooltip from "../../v2/core/Tooltip";
|
||||
import { Tooltip } from "@calcom/ui";
|
||||
|
||||
type InferredVariantProps = VariantProps<typeof buttonClasses>;
|
||||
|
||||
|
|
|
@ -26,18 +26,20 @@ export function Tooltip({
|
|||
defaultOpen={defaultOpen}
|
||||
onOpenChange={onOpenChange}>
|
||||
<TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>
|
||||
<TooltipPrimitive.Content
|
||||
className={classNames(
|
||||
side === "top" && "-mt-7",
|
||||
side === "right" && "ml-2",
|
||||
<TooltipPrimitive.Portal>
|
||||
<TooltipPrimitive.Content
|
||||
className={classNames(
|
||||
side === "top" && "-mt-7",
|
||||
side === "right" && "ml-2",
|
||||
|
||||
"relative z-40 rounded-md bg-gray-900 px-2 py-1 text-xs font-semibold text-white shadow-lg dark:bg-white dark:text-gray-600"
|
||||
)}
|
||||
side={side}
|
||||
align="center"
|
||||
{...props}>
|
||||
{content}
|
||||
</TooltipPrimitive.Content>
|
||||
"relative z-40 rounded-md bg-gray-900 px-2 py-1 text-xs font-semibold text-white shadow-lg dark:bg-white dark:text-gray-600"
|
||||
)}
|
||||
side={side}
|
||||
align="center"
|
||||
{...props}>
|
||||
{content}
|
||||
</TooltipPrimitive.Content>
|
||||
</TooltipPrimitive.Portal>
|
||||
</TooltipPrimitive.Root>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue