mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
Dark mode.
This commit is contained in:
parent
4bb95cd997
commit
aa265d1d42
29 changed files with 221 additions and 60 deletions
13
components/settings/ThemeButton.js
Normal file
13
components/settings/ThemeButton.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import React from 'react';
|
||||
import Button from 'components/common/Button';
|
||||
import useTheme from 'hooks/useTheme';
|
||||
|
||||
export default function ThemeButton() {
|
||||
const [theme, setTheme] = useTheme();
|
||||
|
||||
function handleClick() {
|
||||
setTheme(theme === 'light' ? 'dark' : 'light');
|
||||
}
|
||||
|
||||
return <Button onClick={handleClick}>{theme}</Button>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue