Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: give Panel an optional header icon slot

Adds an `icon` prop to Panel (small emoji glyph left of the title,
aria-hidden, chosen per panel with no default) and wires it into every
current Panel caller: hives (bee), create-agent's form (robot) and info
panel (identity card, moved off the info panel's body copy where it
started as a one-off), jobs (puzzle piece), the components gallery
itself (toolbox), and the 404 page (compass). Adds a components-page
demo section and a whimsy-section pointer in the design guide.

Closes: #3508
This commit is contained in:
iris 2026-08-19 17:17:15 +02:00
commit b25aa157df
9 changed files with 49 additions and 15 deletions

View file

@ -88,7 +88,7 @@ function RefreshIntervalPickerSample() {
export function ComponentsPage() {
return (
<Panel title="components">
<Panel title="components" icon="🧰">
<p class="components-intro">
Every primitive in <code>src/ui/</code>, shown in each mode it supports. Sample data
only — nothing here calls the API.
@ -101,6 +101,11 @@ export function ComponentsPage() {
<Sample label="without title">
<Panel>panel body content, no title</Panel>
</Sample>
<Sample label="with icon (per panel, no default — see the doc comment)">
<Panel title="example title" icon="✨">
panel body content
</Panel>
</Sample>
<Sample label="with actions (e.g. HivesPage's refresh picker)">
<Panel
title="example title"