| 21 | }; |
| 22 | |
| 23 | export const TooltipContent = <T extends ValidComponent = "div">( |
| 24 | props: PolymorphicProps<T, tooltipContentProps<T>>, |
| 25 | ) => { |
| 26 | const [local, rest] = splitProps(props as tooltipContentProps, ["class"]); |
| 27 | |
| 28 | return ( |
| 29 | <TooltipPrimitive.Portal> |
| 30 | <TooltipPrimitive.Content |
| 31 | class={cn( |
| 32 | "z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95", |
| 33 | local.class, |
| 34 | )} |
| 35 | {...rest} |
| 36 | /> |
| 37 | </TooltipPrimitive.Portal> |
| 38 | ); |
| 39 | }; |