14 lines · 862 BRaw
| 1 | /** |
| 2 | * The mark of a commit on the rail of a commit list: a hollow ring for an agent, a filled blue dot for a person, |
| 3 | * with the number of decisions inside. The parent row is `relative` and its list item is `group/commit`. |
| 4 | */ |
| 5 | export function CommitMark({ agent, decisions }: { agent: boolean; decisions: number }) { |
| 6 | return ( |
| 7 | <> |
| 8 | <span aria-hidden className="absolute top-0 bottom-0 left-[22px] w-0.5 bg-porcelain/45 group-first/commit:top-1/2 group-last/commit:bottom-1/2" /> |
| 9 | <span aria-hidden className={`absolute top-1/2 left-[23px] flex size-5 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full text-[0.7143rem] font-semibold tabular-nums ${agent ? "bg-panel text-ink shadow-[inset_0_0_0_2px_var(--porcelain)]" : "bg-accent text-on-accent"}`}> |
| 10 | {decisions > 0 ? decisions : null} |
| 11 | </span> |
| 12 | </> |
| 13 | ); |
| 14 | } |