diff options
Diffstat (limited to 'ui-web/src/graphics.tsx')
| -rw-r--r-- | ui-web/src/graphics.tsx | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/ui-web/src/graphics.tsx b/ui-web/src/graphics.tsx new file mode 100644 index 0000000..2d452df --- /dev/null +++ b/ui-web/src/graphics.tsx | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | |||
| 2 | export function Equalizer() { | ||
| 3 | return ( | ||
| 4 | <svg className="eq" width="16" height="12" viewBox="0 0 16 12" aria-hidden="true"> | ||
| 5 | <rect className="b0" x="0" width="4" height="12" rx="1" /> | ||
| 6 | <rect className="b1" x="6" width="4" height="12" rx="1" /> | ||
| 7 | <rect className="b2" x="12" width="4" height="12" rx="1" /> | ||
| 8 | </svg> | ||
| 9 | ); | ||
| 10 | } | ||
| 11 | |||
| 12 | export function Sparkline({ negative }: { negative: boolean }) { | ||
| 13 | return ( | ||
| 14 | <svg className={negative ? 'spark neg' : 'spark'} width="64" height="28" viewBox="0 0 64 28" aria-hidden="true"> | ||
| 15 | <polyline className="draw" pathLength="100" points="2,20 14,16 26,22 38,11 50,14 62,5" /> | ||
| 16 | <circle className="rider" r="2.8" /> | ||
| 17 | </svg> | ||
| 18 | ); | ||
| 19 | } | ||
| 20 | |||
| 21 | export function MarketChart() { | ||
| 22 | return ( | ||
| 23 | <svg className="mchart" width="300" height="162" viewBox="0 0 240 130" aria-hidden="true"> | ||
| 24 | <line className="rule" x1="18" y1="20" x2="228" y2="20" /> | ||
| 25 | <line className="rule" x1="18" y1="65" x2="228" y2="65" strokeDasharray="3 4" /> | ||
| 26 | <line className="rule" x1="18" y1="110" x2="228" y2="110" /> | ||
| 27 | <line className="rule" x1="18" y1="14" x2="18" y2="116" /> | ||
| 28 | <text x="0" y="24"> | ||
| 29 | 1.0 | ||
| 30 | </text> | ||
| 31 | <text className="lo" x="0" y="114"> | ||
| 32 | 0.0 | ||
| 33 | </text> | ||
| 34 | <path className="draw y" pathLength="100" d="M22 66 C96 64 150 22 224 22" /> | ||
| 35 | <path className="draw n" pathLength="100" d="M22 66 C96 68 150 110 224 110" /> | ||
| 36 | <circle className="rider y" r="4" /> | ||
| 37 | <circle className="rider n" r="4" /> | ||
| 38 | </svg> | ||
| 39 | ); | ||
| 40 | } | ||
| 41 | |||
| 42 | export function Pinwheel() { | ||
| 43 | return ( | ||
| 44 | <svg className="pinwheel" width="20" height="20" viewBox="0 0 20 20" aria-hidden="true"> | ||
| 45 | <g> | ||
| 46 | <path d="M 10 10 L 10 2 A 8 8 0 0 1 15.65 4.35 Q 12 8 10 10 Z M 10 10 L 18 10 A 8 8 0 0 1 15.65 15.65 Q 12 12 10 10 Z M 10 10 L 10 18 A 8 8 0 0 1 4.35 15.65 Q 8 12 10 10 Z M 10 10 L 2 10 A 8 8 0 0 1 4.35 4.35 Q 8 8 10 10 Z" /> | ||
| 47 | <circle cx="10" cy="10" r="2.2" /> | ||
| 48 | </g> | ||
| 49 | </svg> | ||
| 50 | ); | ||
| 51 | } | ||