Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: shared Hint, ActionRow, Toolbar, EmptyState, ExternalLink and ExpandableCard replace per-page copies

Hint, ActionRow, Toolbar, EmptyState and ExternalLink replace the muted
text, button row, refresh bar, empty line and _blank anchor that each page
restyled under its own class. ExpandableCard (with a loading twin) holds the
builds and recent-runs cards, which had identical head and body CSS. The
create form's raw checkbox becomes CheckboxField. The components page shows
each new piece.
This commit is contained in:
iris 2026-11-06 17:54:24 +01:00 • committed by mara
commit 8a2e5203ad
2 changed files with 689 additions and 427 deletions

View file

@ -0,0 +1,8 @@
.ui-empty-state {
margin: 0;
color: var(--muted);
}
.ui-empty-state-centered {
padding: 1.25em 0.75em;
text-align: center;
}

View file

@ -0,0 +1,19 @@
// <EmptyState> — what a list or a section says when it holds nothing: "No runs
// yet.", "none linked". Muted, with room around it. `Table`'s `emptyMessage`
// and `FilterableView` use the same look through this component.
import type { ComponentChildren } from "preact";
import "./EmptyState.css";
export function EmptyState({
centered = false,
children,
}: {
centered?: boolean;
children: ComponentChildren;
}) {
return (
<p class={"ui-empty-state" + (centered ? " ui-empty-state-centered" : "")}>
{children}
</p>
);
}