From 08e0d7e4c39685b38b0e8c9dd9c94bd23b01195a Mon Sep 17 00:00:00 2001 From: Jet Pham Date: Tue, 18 Nov 2025 00:45:50 -0800 Subject: [PATCH] feat: use label and legend for boxes --- src/app/_components/bordered-box.tsx | 51 ++++------------------------ 1 file changed, 6 insertions(+), 45 deletions(-) diff --git a/src/app/_components/bordered-box.tsx b/src/app/_components/bordered-box.tsx index 700428f..0cee11d 100644 --- a/src/app/_components/bordered-box.tsx +++ b/src/app/_components/bordered-box.tsx @@ -11,57 +11,18 @@ export function BorderedBox({ children, className = "", }: BorderedBoxProps) { - // Generate unique ID for this instance to avoid conflicts - const maskId = `borderMask-${Math.random().toString(36).substring(2, 11)}`; - - // Calculate SVG mask values - approximate 1ch = 16px for IBM VGA font - const chToPx = 16; - const maskX = 4 + chToPx; // 4px + 1ch - const maskWidth = label ? label.length * chToPx : 0; - return ( -
-
- {label && ( - - - - - - - - - )} - - {label && ( - + {label} - + )} -
{children}
-
+ {children} + ); }