| ... | ... | @@ -17,6 +17,7 @@ function TooltipPopup({ |
| 17 | 17 | align = "center", |
| 18 | 18 | sideOffset = 4, |
| 19 | 19 | side = "top", |
| 20 | variant = "default", |
| 20 | 21 | anchor, |
| 21 | 22 | children, |
| 22 | 23 | ...props |
| ... | ... | @@ -24,6 +25,7 @@ function TooltipPopup({ |
| 24 | 25 | align?: TooltipPrimitive.Positioner.Props["align"]; |
| 25 | 26 | side?: TooltipPrimitive.Positioner.Props["side"]; |
| 26 | 27 | sideOffset?: TooltipPrimitive.Positioner.Props["sideOffset"]; |
| 28 | variant?: "default" | "glass"; |
| 27 | 29 | anchor?: TooltipPrimitive.Positioner.Props["anchor"]; |
| 28 | 30 | }) { |
| 29 | 31 | return ( |
| ... | ... | @@ -38,7 +40,10 @@ function TooltipPopup({ |
| 38 | 40 | > |
| 39 | 41 | <TooltipPrimitive.Popup |
| 40 | 42 | className={cn( |
| 41 | | "relative flex h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) text-balance rounded-md border bg-popover not-dark:bg-clip-padding text-popover-foreground text-xs shadow-md/5 transition-[width,height,scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0 data-instant:duration-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", |
| 43 | "relative flex h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) text-balance rounded-md text-popover-foreground text-xs transition-[width,height,scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0 data-instant:duration-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", |
| 44 | variant === "glass" |
| 45 | ? "dropdown-glass shadow-xl shadow-black/25 before:hidden" |
| 46 | : "border bg-popover not-dark:bg-clip-padding shadow-md/5", |
| 42 | 47 | className, |
| 43 | 48 | )} |
| 44 | 49 | data-slot="tooltip-popup" |