Files
umami/src/app/(main)/settings/preferences/ThemeSetting.tsx
2025-11-22 22:42:42 -08:00

22 lines
563 B
TypeScript

import { Button, Icon, Row, useTheme } from '@umami/react-zen';
import { Moon, Sun } from '@/components/icons';
export function ThemeSetting() {
const { theme, setTheme } = useTheme();
return (
<Row gap>
<Button variant={theme === 'light' ? 'primary' : undefined} onPress={() => setTheme('light')}>
<Icon>
<Sun />
</Icon>
</Button>
<Button variant={theme === 'dark' ? 'primary' : undefined} onPress={() => setTheme('dark')}>
<Icon>
<Moon />
</Icon>
</Button>
</Row>
);
}