"use client";
import classNames from "@calcom/ui/classNames";
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
import React from "react";
export function Tooltip({
children,
content,
open,
defaultOpen,
onOpenChange,
delayDuration,
side = "top",
...props
}: {
children: React.ReactNode;
content: React.ReactNode;
delayDuration?: number;
open?: boolean;
defaultOpen?: boolean;
side?: "top" | "right" | "bottom" | "left";
onOpenChange?: (open: boolean) => void;
} & TooltipPrimitive.TooltipContentProps) {
const Content = (
{content}
);
if (content === undefined || content === null || content === "") return <>{children}>;
const trigger = React.isValidElement(children) ? children : {children};
return (
{trigger}
{Content}
);
}
export default Tooltip;