@@ -2,7 +2,7 @@ import React from "react";
22import { cn } from "@/lib/utils" ;
33import type { RuntimeConfig } from "@/types/runtime" ;
44import { extractSshHostname } from "@/utils/ui/runtimeBadge" ;
5- import { TooltipWrapper , Tooltip } from "./Tooltip " ;
5+ import { Tooltip , TooltipTrigger , TooltipContent } from "./ui/tooltip " ;
66
77interface RuntimeBadgeProps {
88 runtimeConfig ?: RuntimeConfig ;
@@ -21,35 +21,37 @@ export function RuntimeBadge({ runtimeConfig, className }: RuntimeBadgeProps) {
2121 }
2222
2323 return (
24- < TooltipWrapper inline >
25- < span
26- className = { cn (
27- "inline-flex items-center rounded px-1 py-0.5" ,
28- "bg-accent/10 text-accent border border-accent/30" ,
29- className
30- ) }
31- >
32- < svg
33- width = "12"
34- height = "12"
35- viewBox = "0 0 16 16"
36- fill = "none"
37- stroke = "currentColor"
38- strokeWidth = "1.5"
39- strokeLinecap = "round"
40- strokeLinejoin = "round"
41- aria-label = "SSH Runtime"
24+ < Tooltip >
25+ < TooltipTrigger asChild >
26+ < span
27+ className = { cn (
28+ "inline-flex items-center rounded px-1 py-0.5" ,
29+ "bg-accent/10 text-accent border border-accent/30" ,
30+ className
31+ ) }
4232 >
43- { /* Server rack icon */ }
44- < rect x = "2" y = "2" width = "12" height = "4" rx = "1" />
45- < rect x = "2" y = "10" width = "12" height = "4" rx = "1" />
46- < line x1 = "5" y1 = "4" x2 = "5" y2 = "4" />
47- < line x1 = "5" y1 = "12" x2 = "5" y2 = "12" />
48- </ svg >
49- </ span >
50- < Tooltip align = "right" >
33+ < svg
34+ width = "12"
35+ height = "12"
36+ viewBox = "0 0 16 16"
37+ fill = "none"
38+ stroke = "currentColor"
39+ strokeWidth = "1.5"
40+ strokeLinecap = "round"
41+ strokeLinejoin = "round"
42+ aria-label = "SSH Runtime"
43+ >
44+ { /* Server rack icon */ }
45+ < rect x = "2" y = "2" width = "12" height = "4" rx = "1" />
46+ < rect x = "2" y = "10" width = "12" height = "4" rx = "1" />
47+ < line x1 = "5" y1 = "4" x2 = "5" y2 = "4" />
48+ < line x1 = "5" y1 = "12" x2 = "5" y2 = "12" />
49+ </ svg >
50+ </ span >
51+ </ TooltipTrigger >
52+ < TooltipContent side = "right" >
5153 SSH: { runtimeConfig ?. type === "ssh" ? runtimeConfig . host : hostname }
52- </ Tooltip >
53- </ TooltipWrapper >
54+ </ TooltipContent >
55+ </ Tooltip >
5456 ) ;
5557}
0 commit comments