Spaces:
Running
Running
Download src/components/ui/tooltip.tsx from evalstate/mcp-webcam: direct link, hf CLI and curl.
- Browser
- Download file 917 Bytes
-
https://huggingface.co/spaces/evalstate/mcp-webcam/resolve/main/src/components/ui/tooltip.tsx
- Command line
-
hf download hf://spaces/evalstate/mcp-webcam/src/components/ui/tooltip.tsx
-
curl -L -o tooltip.tsx https://huggingface.co/spaces/evalstate/mcp-webcam/resolve/main/src/components/ui/tooltip.tsx
917 Bytes
| import * as React from 'react'; | |
| import * as TooltipPrimitive from '@radix-ui/react-tooltip'; | |
| import { cn } from '@/lib/utils'; | |
| export const TooltipProvider = TooltipPrimitive.Provider; | |
| export const Tooltip = TooltipPrimitive.Root; | |
| export const TooltipTrigger = TooltipPrimitive.Trigger; | |
| export const TooltipContent = React.forwardRef< | |
| React.ComponentRef<typeof TooltipPrimitive.Content>, | |
| React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> | |
| >(({ className, sideOffset = 6, ...props }, ref) => ( | |
| <TooltipPrimitive.Portal> | |
| <TooltipPrimitive.Content | |
| ref={ref} | |
| sideOffset={sideOffset} | |
| className={cn( | |
| 'z-50 max-w-xs rounded-md border border-line-strong bg-panel px-2.5 py-1.5 text-[11px] leading-snug text-fg shadow-md', | |
| className, | |
| )} | |
| {...props} | |
| /> | |
| </TooltipPrimitive.Portal> | |
| )); | |
| TooltipContent.displayName = TooltipPrimitive.Content.displayName; | |