Rewrite admin.

This commit is contained in:
Brian Cao 2022-12-25 22:00:20 -08:00
parent f4db04c3c6
commit 6cf6a97b4d
114 changed files with 2174 additions and 1820 deletions

View file

@ -1,5 +1,5 @@
import classNames from 'classnames';
import Button from 'components/common/Button';
import { Button, Icon } from 'react-basics';
import useTheme from 'hooks/useTheme';
import Sun from 'assets/sun.svg';
import Moon from 'assets/moon.svg';
@ -12,14 +12,20 @@ export default function ThemeSetting() {
<div className={styles.buttons}>
<Button
className={classNames({ [styles.active]: theme === 'light' })}
icon={<Sun />}
onClick={() => setTheme('light')}
/>
>
<Icon>
<Sun />
</Icon>
</Button>
<Button
className={classNames({ [styles.active]: theme === 'dark' })}
icon={<Moon />}
onClick={() => setTheme('dark')}
/>
>
<Icon>
<Moon />
</Icon>
</Button>
</div>
);
}