Watch
0
0
Fork
You've already forked hyperhive
0

frontend: remove the stylix overlay and add hyperhive and Catppuccin light and dark themes

This commit is contained in:
iris 2026-11-22 16:43:49 +01:00 • committed by mara
commit 91e2d26133

View file

@ -28,11 +28,15 @@ import type { ComponentChildren } from "preact";
import { IconButton } from "../icon-button/IconButton.js";
import { GearIcon } from "../icons.js";
import { useDismiss } from "../use-dismiss.js";
import { useThemeOverride, type ThemeOverride } from "./theme-apply.js";
import { useThemeOverride } from "./theme-apply.js";
import { AUTO_THEME, THEMES } from "./themes.js";
import { useMotionOverride, type MotionOverride } from "./motion-apply.js";
import "./SettingsMenu.css";
const THEME_OPTIONS: ThemeOverride[] = ["system", "light", "dark"];
const THEME_OPTIONS = [
{ id: AUTO_THEME, label: "auto" },
...THEMES.map((t) => ({ id: t.id, label: t.label })),
];
const MOTION_OPTIONS: MotionOverride[] = ["system", "allow", "reduce"];
export interface SettingsMenuProps {
@ -85,13 +89,11 @@ export function SettingsMenu({
<span>theme</span>
<select
value={theme}
onChange={(e) =>
setTheme((e.target as HTMLSelectElement).value as ThemeOverride)
}
onChange={(e) => setTheme((e.target as HTMLSelectElement).value)}
>
{THEME_OPTIONS.map((o) => (
<option key={o} value={o}>
{o}
<option key={o.id} value={o.id}>
{o.label}
</option>
))}
</select>