frontend: remove the stylix overlay and add hyperhive and Catppuccin light and dark themes
This commit is contained in:
parent
989d1d578c
commit
91e2d26133
1 changed files with 486 additions and 413 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue