Adopt shared WebUI layout primitives

This commit is contained in:
2026-08-18 11:30:40 +02:00
parent 25b4c0c2f6
commit 68855f6fad
@@ -1,3 +1,4 @@
import { MetricGrid } from "@govoplan/core-webui";
import { useCallback, useEffect, useMemo, useRef, useState, type FormEvent } from "react";
import { useSearchParams } from "react-router";
import {
@@ -1702,12 +1703,12 @@ function ParticipationStats({
const rate = responseCount === null ? null : total ? Math.round((knownResponseCount / total) * 100) : 0;
return (
<Card title={I18N.participation}>
<div className="metric-grid inside">
<MetricGrid spacing="inset">
<MetricCard label={I18N.participants} value={total} />
<MetricCard label={I18N.responses} value={loading ? "…" : responseCount ?? "—"} tone="good" />
<MetricCard label={I18N.awaiting} value={loading ? "…" : awaiting ?? "—"} tone={awaiting ? "warning" : "neutral"} />
<MetricCard label={I18N.participationRate} value={loading ? "…" : rate === null ? "—" : `${rate}%`} tone="info" />
</div>
</MetricGrid>
</Card>
);
}