aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/ui/info-tooltip.tsx
blob: 4dd9719939ee74da1fde05254b28e95c72800d50 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import {
  Tooltip,
  TooltipContent,
  TooltipTrigger,
} from "@/components/ui/tooltip";
import { cn } from "@/lib/utils";
import { HelpCircle, Info } from "lucide-react";

export default function InfoTooltip({
  className,
  children,
  size,
  variant = "tip",
}: {
  className?: string;
  size?: number;
  children?: React.ReactNode;
  variant?: "tip" | "explain";
}) {
  return (
    <Tooltip>
      <TooltipTrigger asChild>
        {variant === "tip" ? (
          <Info
            color="#494949"
            className={cn("z-10 cursor-pointer", className)}
            size={size}
          />
        ) : (
          <HelpCircle className={cn("cursor-pointer", className)} size={size} />
        )}
      </TooltipTrigger>
      <TooltipContent>{children}</TooltipContent>
    </Tooltip>
  );
}