@@ -67,19 +67,14 @@ export function FlowNode({
6767 >
6868 { pulse && (
6969 < motion . div
70- className = { cn (
71- "absolute inset-0 rounded-lg border" ,
72- colorMap [ color ] ,
73- ) }
70+ className = { cn ( "absolute inset-0 rounded-lg border" , colorMap [ color ] ) }
7471 animate = { { opacity : [ 0.5 , 0 ] , scale : [ 1 , 1.15 ] } }
7572 transition = { { duration : 2 , repeat : Infinity , ease : "easeOut" } }
7673 />
7774 ) }
7875 { icon }
7976 < span > { label } </ span >
80- { sublabel && (
81- < span className = "opacity-60 text-[0.85em]" > { sublabel } </ span >
82- ) }
77+ { sublabel && < span className = "opacity-60 text-[0.85em]" > { sublabel } </ span > }
8378 </ motion . div >
8479 ) ;
8580}
@@ -161,22 +156,21 @@ export function FlowLine({
161156 ) }
162157
163158 { /* Arrowhead */ }
164- < div
165- className = { cn (
166- "absolute" ,
167- isH ? "right-0" : "bottom-0" ,
168- ) }
169- >
159+ < div className = { cn ( "absolute" , isH ? "right-0" : "bottom-0" ) } >
170160 < div
171161 className = { cn (
172162 "border-solid" ,
173163 isH
174164 ? "border-l-[5px] border-y-[3px] border-y-transparent"
175165 : "border-t-[5px] border-x-[3px] border-x-transparent" ,
176- color === "amber" && ( isH ? "border-l-amber-500/50" : "border-t-amber-500/50" ) ,
177- color === "green" && ( isH ? "border-l-green-500/50" : "border-t-green-500/50" ) ,
178- color === "red" && ( isH ? "border-l-red-500/50" : "border-t-red-500/50" ) ,
179- color === "gray" && ( isH ? "border-l-fd-border" : "border-t-fd-border" ) ,
166+ color === "amber" &&
167+ ( isH ? "border-l-amber-500/50" : "border-t-amber-500/50" ) ,
168+ color === "green" &&
169+ ( isH ? "border-l-green-500/50" : "border-t-green-500/50" ) ,
170+ color === "red" &&
171+ ( isH ? "border-l-red-500/50" : "border-t-red-500/50" ) ,
172+ color === "gray" &&
173+ ( isH ? "border-l-fd-border" : "border-t-fd-border" ) ,
180174 ) }
181175 />
182176 </ div >
@@ -252,12 +246,14 @@ interface StatusBadgeProps {
252246
253247const statusConfig = {
254248 delivered : {
255- color : "text-green-600 dark:text-green-400 bg-green-500/10 border-green-500/20" ,
249+ color :
250+ "text-green-600 dark:text-green-400 bg-green-500/10 border-green-500/20" ,
256251 defaultLabel : "200 Delivered" ,
257252 icon : "check" ,
258253 } ,
259254 retry : {
260- color : "text-amber-600 dark:text-amber-400 bg-amber-500/10 border-amber-500/20" ,
255+ color :
256+ "text-amber-600 dark:text-amber-400 bg-amber-500/10 border-amber-500/20" ,
261257 defaultLabel : "503 Retry" ,
262258 icon : "retry" ,
263259 } ,
@@ -291,19 +287,47 @@ export function StatusBadge({ status, label, className }: StatusBadgeProps) {
291287 >
292288 { config . icon === "check" && (
293289 < svg className = "size-2.5" viewBox = "0 0 12 12" fill = "none" >
294- < path d = "M2 6l3 3 5-5" stroke = "currentColor" strokeWidth = "1.5" strokeLinecap = "round" strokeLinejoin = "round" />
290+ < path
291+ d = "M2 6l3 3 5-5"
292+ stroke = "currentColor"
293+ strokeWidth = "1.5"
294+ strokeLinecap = "round"
295+ strokeLinejoin = "round"
296+ />
295297 </ svg >
296298 ) }
297299 { config . icon === "retry" && (
298300 < svg className = "size-2.5" viewBox = "0 0 12 12" fill = "none" >
299- < path d = "M2 6a4 4 0 016.5-3M10 6a4 4 0 01-6.5 3" stroke = "currentColor" strokeWidth = "1.5" strokeLinecap = "round" />
301+ < path
302+ d = "M2 6a4 4 0 016.5-3M10 6a4 4 0 01-6.5 3"
303+ stroke = "currentColor"
304+ strokeWidth = "1.5"
305+ strokeLinecap = "round"
306+ />
300307 </ svg >
301308 ) }
302309 { config . icon === "archive" && (
303310 < svg className = "size-2.5" viewBox = "0 0 12 12" fill = "none" >
304- < rect x = "1" y = "2" width = "10" height = "3" rx = "0.5" stroke = "currentColor" strokeWidth = "1" />
305- < path d = "M2 5v4.5a.5.5 0 00.5.5h7a.5.5 0 00.5-.5V5" stroke = "currentColor" strokeWidth = "1" />
306- < path d = "M5 7h2" stroke = "currentColor" strokeWidth = "1" strokeLinecap = "round" />
311+ < rect
312+ x = "1"
313+ y = "2"
314+ width = "10"
315+ height = "3"
316+ rx = "0.5"
317+ stroke = "currentColor"
318+ strokeWidth = "1"
319+ />
320+ < path
321+ d = "M2 5v4.5a.5.5 0 00.5.5h7a.5.5 0 00.5-.5V5"
322+ stroke = "currentColor"
323+ strokeWidth = "1"
324+ />
325+ < path
326+ d = "M5 7h2"
327+ stroke = "currentColor"
328+ strokeWidth = "1"
329+ strokeLinecap = "round"
330+ />
307331 </ svg >
308332 ) }
309333 { label || config . defaultLabel }
@@ -318,7 +342,11 @@ interface FloatingBadgeProps {
318342 delay ?: number ;
319343}
320344
321- export function FloatingBadge ( { label, className, delay = 0 } : FloatingBadgeProps ) {
345+ export function FloatingBadge ( {
346+ label,
347+ className,
348+ delay = 0 ,
349+ } : FloatingBadgeProps ) {
322350 return (
323351 < motion . div
324352 initial = { { opacity : 0 , y : 8 } }
0 commit comments