11type BlockProps = {
22 label : string ;
3- accent ?: ' mint' | ' blue' ;
3+ accent ?: " mint" | " blue" ;
44} ;
55
6- export function DiagramBlock ( { label, accent = ' mint' } : BlockProps ) {
7- const fill = accent === ' mint' ? ' #5fe3c0' : ' #7aa2ff' ;
8- const stroke = ' #1b2237' ;
6+ export function DiagramBlock ( { label, accent = " mint" } : BlockProps ) {
7+ const fill = accent === " mint" ? " #5fe3c0" : " #7aa2ff" ;
8+ const stroke = " #1b2237" ;
99 return (
10- < svg width = "180" height = "72" viewBox = "0 0 180 72" role = "img" aria-label = { label } >
11- < rect x = "5" y = "4" width = "170" height = "64" rx = "12" fill = "rgba(255,255,255,0.04)" stroke = { stroke } strokeWidth = "2" />
10+ < svg
11+ width = "200"
12+ height = "72"
13+ viewBox = "0 0 200 72"
14+ role = "img"
15+ aria-label = { label }
16+ >
17+ < rect
18+ x = "5"
19+ y = "4"
20+ width = "190"
21+ height = "64"
22+ rx = "12"
23+ fill = "rgba(255,255,255,0.04)"
24+ stroke = { stroke }
25+ strokeWidth = "2"
26+ />
1227 < text
13- x = "90 "
28+ x = "100 "
1429 y = "40"
1530 textAnchor = "middle"
1631 fontFamily = "var(--font-display, 'Space Grotesk', sans-serif)"
@@ -27,17 +42,36 @@ export function DiagramBlock({ label, accent = 'mint' }: BlockProps) {
2742type ArrowProps = {
2843 from ?: string ;
2944 to ?: string ;
30- orientation ?: ' horizontal' | ' vertical' ;
45+ orientation ?: " horizontal" | " vertical" ;
3146 className ?: string ;
3247} ;
3348
34- export function DiagramArrow ( { from, to, orientation = 'horizontal' , className } : ArrowProps ) {
35- const label = [ from , to ] . filter ( Boolean ) . join ( ' → ' ) ;
36- if ( orientation === 'vertical' ) {
49+ export function DiagramArrow ( {
50+ from,
51+ to,
52+ orientation = "horizontal" ,
53+ className,
54+ } : ArrowProps ) {
55+ const label = [ from , to ] . filter ( Boolean ) . join ( " → " ) ;
56+ if ( orientation === "vertical" ) {
3757 return (
38- < svg className = { className } width = "72" height = "60" viewBox = "0 0 72 60" role = "img" aria-label = { label } >
58+ < svg
59+ className = { className }
60+ width = "72"
61+ height = "60"
62+ viewBox = "0 0 72 60"
63+ role = "img"
64+ aria-label = { label }
65+ >
3966 < defs >
40- < marker id = "arrowhead-vert" markerWidth = "8" markerHeight = "8" refX = "4" refY = "4" orient = "auto" >
67+ < marker
68+ id = "arrowhead-vert"
69+ markerWidth = "8"
70+ markerHeight = "8"
71+ refX = "4"
72+ refY = "4"
73+ orient = "auto"
74+ >
4175 < polygon points = "0 0, 8 4, 0 8" fill = "#7aa2ff" />
4276 </ marker >
4377 </ defs >
@@ -55,9 +89,23 @@ export function DiagramArrow({ from, to, orientation = 'horizontal', className }
5589 }
5690
5791 return (
58- < svg className = { className } width = "60" height = "72" viewBox = "0 0 60 72" role = "img" aria-label = { label } >
92+ < svg
93+ className = { className }
94+ width = "60"
95+ height = "72"
96+ viewBox = "0 0 60 72"
97+ role = "img"
98+ aria-label = { label }
99+ >
59100 < defs >
60- < marker id = "arrowhead" markerWidth = "8" markerHeight = "8" refX = "4" refY = "4" orient = "auto" >
101+ < marker
102+ id = "arrowhead"
103+ markerWidth = "8"
104+ markerHeight = "8"
105+ refX = "4"
106+ refY = "4"
107+ orient = "auto"
108+ >
61109 < polygon points = "0 0, 8 4, 0 8" fill = "#7aa2ff" />
62110 </ marker >
63111 </ defs >
0 commit comments