The best way to control Claude Code, Codex and more from any computer or phone

main
astro 37 lines 703 Bytes
Raw
1 ---
2 /**
3 * `<DomainIcon kind="event" />`: a building block's icon, in its colour.
4 * Inline in HTML (legends, prose). Inside an SVG, use `<DomainNode />`.
5 */
6 import { KINDS, type Kind } from "./kinds.ts";
7
8 interface Props {
9 kind: Kind;
10 size?: number;
11 }
12
13 const { kind, size = 14 } = Astro.props as Props;
14 const style = KINDS[kind];
15 ---
16
17 <svg
18 class="alc-domain-icon"
19 width={size}
20 height={size}
21 viewBox="0 0 24 24"
22 style={`--hue:${style.hue}`}
23 aria-hidden="true"
24 >
25 {style.icon.map((d) => <path d={d} />)}
26 </svg>
27
28 <style>
29 .alc-domain-icon {
30 flex: none;
31 fill: none;
32 stroke: var(--hue);
33 stroke-width: 2;
34 stroke-linecap: round;
35 stroke-linejoin: round;
36 }
37 </style>