MCPcopy Create free account
hub / github.com/adobe/react-spectrum / Tooltip

Function Tooltip

starters/tailwind/src/Tooltip.tsx:27–47  ·  view source on GitHub ↗
({children, ...props}: TooltipProps)

Source from the content-addressed store, hash-verified

25});
26
27export function Tooltip({children, ...props}: TooltipProps) {
28 return (
29 <AriaTooltip
30 {...props}
31 offset={10}
32 className={composeRenderProps(props.className, (className, renderProps) =>
33 styles({...renderProps, className})
34 )}>
35 <OverlayArrow>
36 <svg
37 width={8}
38 height={8}
39 viewBox="0 0 8 8"
40 className="block fill-neutral-700 dark:fill-neutral-600 forced-colors:fill-[Canvas] stroke-neutral-800 dark:stroke-white/10 forced-colors:stroke-[ButtonBorder] group-placement-bottom:rotate-180 group-placement-left:-rotate-90 group-placement-right:rotate-90">
41 <path d="M0 0 L4 4 L8 0" />
42 </svg>
43 </OverlayArrow>
44 {children}
45 </AriaTooltip>
46 );
47}

Callers

nothing calls this directly

Calls 1

composeRenderPropsFunction · 0.85

Tested by

no test coverage detected