@@ -8,22 +8,13 @@ export function DiagramBlock({ label, accent = 'mint' }: BlockProps) {
88 const stroke = '#1b2237' ;
99 return (
1010 < svg width = "180" height = "72" viewBox = "0 0 180 72" role = "img" aria-label = { label } >
11- < rect
12- x = "4"
13- y = "4"
14- width = "172"
15- height = "64"
16- rx = "12"
17- fill = "rgba(255,255,255,0.04)"
18- stroke = { stroke }
19- strokeWidth = "2"
20- />
11+ < rect x = "5" y = "4" width = "170" height = "64" rx = "12" fill = "rgba(255,255,255,0.04)" stroke = { stroke } strokeWidth = "2" />
2112 < text
2213 x = "90"
2314 y = "40"
2415 textAnchor = "middle"
2516 fontFamily = "var(--font-display, 'Space Grotesk', sans-serif)"
26- fontSize = "14 "
17+ fontSize = "12 "
2718 fontWeight = "600"
2819 fill = { fill }
2920 >
@@ -36,12 +27,35 @@ export function DiagramBlock({ label, accent = 'mint' }: BlockProps) {
3627type ArrowProps = {
3728 from ?: string ;
3829 to ?: string ;
30+ orientation ?: 'horizontal' | 'vertical' ;
31+ className ?: string ;
3932} ;
4033
41- export function DiagramArrow ( { from, to } : ArrowProps ) {
34+ export function DiagramArrow ( { from, to, orientation = 'horizontal' , className } : ArrowProps ) {
4235 const label = [ from , to ] . filter ( Boolean ) . join ( ' → ' ) ;
36+ if ( orientation === 'vertical' ) {
37+ return (
38+ < svg className = { className } width = "72" height = "60" viewBox = "0 0 72 60" role = "img" aria-label = { label } >
39+ < defs >
40+ < marker id = "arrowhead-vert" markerWidth = "8" markerHeight = "8" refX = "4" refY = "4" orient = "auto" >
41+ < polygon points = "0 0, 8 4, 0 8" fill = "#7aa2ff" />
42+ </ marker >
43+ </ defs >
44+ < line
45+ x1 = "36"
46+ y1 = "10"
47+ x2 = "36"
48+ y2 = "48"
49+ stroke = "#7aa2ff"
50+ strokeWidth = "3"
51+ markerEnd = "url(#arrowhead-vert)"
52+ />
53+ </ svg >
54+ ) ;
55+ }
56+
4357 return (
44- < svg width = "60" height = "72" viewBox = "0 0 60 72" role = "img" aria-label = { label } >
58+ < svg className = { className } width = "60" height = "72" viewBox = "0 0 60 72" role = "img" aria-label = { label } >
4559 < defs >
4660 < marker id = "arrowhead" markerWidth = "8" markerHeight = "8" refX = "4" refY = "4" orient = "auto" >
4761 < polygon points = "0 0, 8 4, 0 8" fill = "#7aa2ff" />
0 commit comments