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

View file

@ -0,0 +1,28 @@
// <ExternalLink> — a link that opens another site in a new tab. It always
// sets `rel="noopener noreferrer"`, so the opened page cannot reach this one
// and is not told where the visitor came from.
import type { ComponentChildren } from "preact";
export function ExternalLink({
href,
title,
class: extraClass,
children,
}: {
href: string;
title?: string;
class?: string;
children: ComponentChildren;
}) {
return (
<a
href={href}
target="_blank"
rel="noopener noreferrer"
title={title}
class={extraClass}
>
{children}
</a>
);
}