Skip to content
Source
Sign inSign up

ThreadHoverCard.tsx

33 lines852 Bytes

1import type { ComponentProps, ReactNode } from "react";
2import { TooltipPopup } from "./ui/tooltip";
3import { cn } from "~/lib/utils";
4​
5export function ThreadHoverCardPopup({ className, ...props }: ComponentProps<typeof TooltipPopup>) {
6 return (
7 <TooltipPopup
8 {...props}
9 variant="glass"
10 className={cn("max-w-80 text-left whitespace-normal", className)}
11 />
12 );
14​
15export function ThreadHoverCard({
16 title,
17 children,
18 footer,
19}: {
20 title: string;
21 children: ReactNode;
22 footer?: ReactNode;
23}) {
24 return (
25 <div className="flex min-w-0 max-w-80 flex-col gap-2 px-1 py-2">
26 <div className="min-w-0 truncate text-xs leading-tight font-medium text-foreground">
27 {title}
28 </div>
29 <div className="grid gap-1.5 pl-0.5 text-xs text-muted-foreground">{children}</div>
30 {footer}
31 </div>
32 );