MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / HelpTooltip

Function HelpTooltip

packages/react/src/components/help-tooltip.tsx:7–32  ·  view source on GitHub ↗
(props: {
  readonly label: string;
  readonly children: React.ReactNode;
  readonly className?: string;
})

Source from the content-addressed store, hash-verified

5import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip";
6
7export function HelpTooltip(props: {
8 readonly label: string;
9 readonly children: React.ReactNode;
10 readonly className?: string;
11}) {
12 return (
13 <TooltipProvider>
14 <Tooltip>
15 <TooltipTrigger asChild>
16 <Button
17 type="button"
18 variant="ghost"
19 size="icon-xs"
20 className="inline-flex size-4 items-center justify-center rounded-full text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring"
21 aria-label={`${props.label} help`}
22 >
23 <InfoIcon className="size-3.5" aria-hidden />
24 </Button>
25 </TooltipTrigger>
26 <TooltipContent className={cn("w-max max-w-72 text-left text-wrap", props.className)}>
27 {props.children}
28 </TooltipContent>
29 </Tooltip>
30 </TooltipProvider>
31 );
32}

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected