MCPcopy Create free account
hub / github.com/KartikLabhshetwar/foliox / TooltipContent

Function TooltipContent

components/ui/tooltip.tsx:42–66  ·  view source on GitHub ↗
({
  className,
  sideOffset = 0,
  children,
  icon: Icon,
  ...props
}: TooltipContentProps)

Source from the content-addressed store, hash-verified

40}
41
42function TooltipContent({
43 className,
44 sideOffset = 0,
45 children,
46 icon: Icon,
47 ...props
48}: TooltipContentProps) {
49 return (
50 <TooltipPrimitive.Portal>
51 <TooltipPrimitive.Content
52 data-slot="tooltip-content"
53 sideOffset={sideOffset}
54 className={cn(
55 "bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance flex items-center gap-1.5",
56 className
57 )}
58 {...props}
59 >
60 {Icon && <Icon className="h-3 w-3 shrink-0" />}
61 {children}
62 <TooltipPrimitive.Arrow className="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px]" />
63 </TooltipPrimitive.Content>
64 </TooltipPrimitive.Portal>
65 )
66}
67
68export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected