chore: decouple calcom/ui/Tooltip from atoms (#19798)
* chore: decouple calcom/ui from atoms #1 * recover input from main * fix: vite config dialog
This commit is contained in:
1 parent
810f3b834c
commit
b3e344d226
4 files changed
+25
-3
No files matched your search
@@ -3,7 +3,6 @@
|
||||
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
||||
import React from "react";
|
||||
|
||||
import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform";
|
||||
import classNames from "@calcom/ui/classNames";
|
||||
|
||||
export function Tooltip({
|
||||
@@ -24,7 +23,6 @@ export function Tooltip({
|
||||
side?: "top" | "right" | "bottom" | "left";
|
||||
onOpenChange?: (open: boolean) => void;
|
||||
} & TooltipPrimitive.TooltipContentProps) {
|
||||
const isPlatform = useIsPlatform();
|
||||
const Content = (
|
||||
<TooltipPrimitive.Content
|
||||
{...props}
|
||||
@@ -48,7 +46,7 @@ export function Tooltip({
|
||||
defaultOpen={defaultOpen}
|
||||
onOpenChange={onOpenChange}>
|
||||
<TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>
|
||||
{isPlatform ? <>{Content}</> : <TooltipPrimitive.Portal>{Content}</TooltipPrimitive.Portal>}
|
||||
<TooltipPrimitive.Portal>{Content}</TooltipPrimitive.Portal>
|
||||
</TooltipPrimitive.Root>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user