Watch
0
0
Fork
You've already forked hyperhive
0

frontend: one shared IconButton for the header's settings, links and account buttons

The gear was a quiet pill badge (37px tall), the links button a bordered rounded square with its own CSS, and the avatar a third copy of the same circle. They are one IconButton now: a 2.75em circle with no fill until hovered or open, then the raised fill and a purple outline. The avatar keeps its accent fill and initials and takes the shared shape. The swarm UI and the dashboard both get the shared look.
This commit is contained in:
iris 2026-11-20 00:22:56 +01:00 • committed by mara
commit 7efa8c8ea7

View file

@ -25,7 +25,7 @@
// page-specific naming decision.
import { useEffect, useRef, useState } from "preact/hooks";
import type { ComponentChildren } from "preact";
import { Badge } from "../badge/Badge.js";
import { IconButton } from "../icon-button/IconButton.js";
import { GearIcon } from "../icons.js";
import { useThemeOverride, type ThemeOverride } from "./theme-apply.js";
import { useMotionOverride, type MotionOverride } from "./motion-apply.js";
@ -85,13 +85,13 @@ export function SettingsMenu({
return (
<div class="settings-menu-anchor" ref={rootRef}>
<Badge
value={<GearIcon />}
title="settings"
variant="quiet"
<IconButton
label="settings"
onClick={() => setOpen((v) => !v)}
expanded={open}
/>
>
<GearIcon />
</IconButton>
{open ? (
<div class="settings-menu-popover" role="menu" aria-label="settings">
<label class="settings-menu-row">