mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 09:35:36 +01:00
Settings refactor.
This commit is contained in:
parent
1b81074752
commit
c98f324c22
56 changed files with 706 additions and 348 deletions
21
src/app/(main)/settings/preferences/ThemeSetting.tsx
Normal file
21
src/app/(main)/settings/preferences/ThemeSetting.tsx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { Row, Button, Icon, useTheme } from '@umami/react-zen';
|
||||
import { Sun, Moon } 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>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue