| 1 | --- |
| 2 | import { CF_COLOR } from "./_colors"; |
| 3 | |
| 4 | interface Props { |
| 5 | label?: string; |
| 6 | height?: number; |
| 7 | color?: string; |
| 8 | } |
| 9 | |
| 10 | const { label, height = 22, color = CF_COLOR } = Astro.props; |
| 11 | --- |
| 12 | |
| 13 | <div class="diag-arrow"> |
| 14 | {label && <div class="diag-arrow__label">{label}</div>} |
| 15 | <svg width="14" height={height} viewBox={`0 0 14 ${height}`}> |
| 16 | <path d={`M7 0 L7 ${height - 6}`} stroke={color} stroke-width="1.4" /> |
| 17 | <path |
| 18 | d={`M3 ${height - 8} L7 ${height - 1} L11 ${height - 8}`} |
| 19 | stroke={color} |
| 20 | stroke-width="1.4" |
| 21 | fill="none" |
| 22 | stroke-linecap="round" |
| 23 | stroke-linejoin="round" |
| 24 | /> |
| 25 | </svg> |
| 26 | </div> |
| 27 | |
| 28 | <style> |
| 29 | .diag-arrow { |
| 30 | display: flex; |
| 31 | flex-direction: column; |
| 32 | align-items: center; |
| 33 | gap: 2px; |
| 34 | padding: 2px 0; |
| 35 | } |
| 36 | .diag-arrow__label { |
| 37 | font-family: var(--alc-font-mono); |
| 38 | font-size: 10px; |
| 39 | color: var(--alc-fg-3); |
| 40 | } |
| 41 | </style> |