swarm-ui: add a components-library page (hyperhive#3288)

New /components route showing every ui primitive (Panel, StatusChip,
Table) in each mode it supports: Panel with/without a title,
StatusChip's four tones, Table populated and empty. Sample data only,
no API calls, so it renders identically regardless of backend state.
Linked from the Shell nav next to "overview".

Verified with npm run build + npm run typecheck, and a headless
chromium screenshot of the built dist.
This commit is contained in:
iris 2026-08-15 12:57:33 +02:00
commit cfc8f2b22c
4 changed files with 137 additions and 1 deletions

View file

@ -16,7 +16,10 @@ import type { ComponentChildren } from 'preact';
import { Link, useRoute } from 'wouter-preact';
import './Shell.css';
const NAV_ITEMS: { href: string; label: string }[] = [{ href: '/', label: 'overview' }];
const NAV_ITEMS: { href: string; label: string }[] = [
{ href: '/', label: 'overview' },
{ href: '/components', label: 'components' },
];
function NavLink({ href, label }: { href: string; label: string }) {
const [active] = useRoute(href);