({ pct, label }: { pct: number; label: string })
| 88 | } |
| 89 | |
| 90 | export function PctBadge({ pct, label }: { pct: number; label: string }) { |
| 91 | if (pct === 0) return html`<span class="trend-badge trend-stable">${label} 0%</span>`; |
| 92 | const cls = pct > 0 ? 'trend-improving' : 'trend-worsening'; |
| 93 | const sign = pct > 0 ? '+' : ''; |
| 94 | return html`<span class="trend-badge ${cls}">${sign}${pct}% ${label}</span>`; |
| 95 | } |
| 96 | |
| 97 | export function ErrorMsg({ message }: { message: string }) { |
| 98 | return html`<div class="error-boundary"> |