Adopt shared WebUI layout primitives
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { MetricGrid } from "@govoplan/core-webui";
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState, type FormEvent } from "react";
|
import { useCallback, useEffect, useMemo, useRef, useState, type FormEvent } from "react";
|
||||||
import { useSearchParams } from "react-router";
|
import { useSearchParams } from "react-router";
|
||||||
import {
|
import {
|
||||||
@@ -1702,12 +1703,12 @@ function ParticipationStats({
|
|||||||
const rate = responseCount === null ? null : total ? Math.round((knownResponseCount / total) * 100) : 0;
|
const rate = responseCount === null ? null : total ? Math.round((knownResponseCount / total) * 100) : 0;
|
||||||
return (
|
return (
|
||||||
<Card title={I18N.participation}>
|
<Card title={I18N.participation}>
|
||||||
<div className="metric-grid inside">
|
<MetricGrid spacing="inset">
|
||||||
<MetricCard label={I18N.participants} value={total} />
|
<MetricCard label={I18N.participants} value={total} />
|
||||||
<MetricCard label={I18N.responses} value={loading ? "…" : responseCount ?? "—"} tone="good" />
|
<MetricCard label={I18N.responses} value={loading ? "…" : responseCount ?? "—"} tone="good" />
|
||||||
<MetricCard label={I18N.awaiting} value={loading ? "…" : awaiting ?? "—"} tone={awaiting ? "warning" : "neutral"} />
|
<MetricCard label={I18N.awaiting} value={loading ? "…" : awaiting ?? "—"} tone={awaiting ? "warning" : "neutral"} />
|
||||||
<MetricCard label={I18N.participationRate} value={loading ? "…" : rate === null ? "—" : `${rate}%`} tone="info" />
|
<MetricCard label={I18N.participationRate} value={loading ? "…" : rate === null ? "—" : `${rate}%`} tone="info" />
|
||||||
</div>
|
</MetricGrid>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user