MCPcopy Index your code
hub / github.com/Tailframes/react-components / Tooltip

Function Tooltip

components/tooltip.tsx:142–168  ·  view source on GitHub ↗
({
  placement = 'top',
  size = 'medium',
  variant = 'primary',
  showArrow = true,
  children,
  className,
  containerClassName,
  value,
  ...rest
}: TooltipProps)

Source from the content-addressed store, hash-verified

140}
141
142export function Tooltip({
143 placement = 'top',
144 size = 'medium',
145 variant = 'primary',
146 showArrow = true,
147 children,
148 className,
149 containerClassName,
150 value,
151 ...rest
152}: TooltipProps) {
153 const id = useId();
154
155 return (
156 <div className={clsxMerge('group relative inline-block whitespace-nowrap', containerClassName)}>
157 <div aria-describedby={id}>{children}</div>
158 <span
159 id={id}
160 role='tooltip'
161 className={clsxMerge(tooltipVariants({ placement, size, variant, showArrow }), className)}
162 {...rest}
163 >
164 {value}
165 </span>
166 </div>
167 );
168}
169
170Tooltip.displayName = 'Tooltip';

Callers

nothing calls this directly

Calls 1

clsxMergeFunction · 0.90

Tested by

no test coverage detected