Adopt shared WebUI layout primitives
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { MetricGrid } from "@govoplan/core-webui";
|
||||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||||
import {
|
import {
|
||||||
Archive,
|
Archive,
|
||||||
@@ -1370,13 +1371,13 @@ function TemplateImpactPreview({
|
|||||||
</div>
|
</div>
|
||||||
{preview.truncated ? <StatusBadge status="warning" label="List truncated" /> : null}
|
{preview.truncated ? <StatusBadge status="warning" label="List truncated" /> : null}
|
||||||
</div>
|
</div>
|
||||||
<div className="metric-grid compact postbox-preview-metrics">
|
<MetricGrid columns="auto" density="compact" spacing="none" minimum="compact">
|
||||||
<MetricCard label="Targets" value={preview.total} tone="info" />
|
<MetricCard label="Targets" value={preview.total} tone="info" />
|
||||||
<MetricCard label="Ready" value={preview.ready_count} tone="good" />
|
<MetricCard label="Ready" value={preview.ready_count} tone="good" />
|
||||||
<MetricCard label="Existing" value={preview.existing_count} />
|
<MetricCard label="Existing" value={preview.existing_count} />
|
||||||
<MetricCard label="Vacant" value={preview.vacant_count} tone="warning" />
|
<MetricCard label="Vacant" value={preview.vacant_count} tone="warning" />
|
||||||
<MetricCard label="Blocked" value={preview.blocked_count} tone="danger" />
|
<MetricCard label="Blocked" value={preview.blocked_count} tone="danger" />
|
||||||
</div>
|
</MetricGrid>
|
||||||
{preview.diagnostics.length ? (
|
{preview.diagnostics.length ? (
|
||||||
<p className="postbox-form-note">{preview.diagnostics.join(", ")}</p>
|
<p className="postbox-form-note">{preview.diagnostics.join(", ")}</p>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@@ -485,10 +485,6 @@
|
|||||||
padding-top: 16px;
|
padding-top: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.postbox-preview-metrics.metric-grid {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.postbox-preview-targets {
|
.postbox-preview-targets {
|
||||||
max-height: 280px;
|
max-height: 280px;
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|||||||
Reference in New Issue
Block a user