Renamed (app) folder to (main).

This commit is contained in:
Mike Cao 2023-10-03 16:05:17 -07:00
parent 5c15778c9b
commit c990459238
167 changed files with 48 additions and 114 deletions

View file

@ -0,0 +1,33 @@
import classNames from 'classnames';
import { Button, Icon } from 'react-basics';
import useTheme from 'components/hooks/useTheme';
import Sun from 'assets/sun.svg';
import Moon from 'assets/moon.svg';
import styles from './ThemeSetting.module.css';
export function ThemeSetting() {
const { theme, saveTheme } = useTheme();
return (
<div className={styles.buttons}>
<Button
className={classNames({ [styles.active]: theme === 'light' })}
onClick={() => saveTheme('light')}
>
<Icon>
<Sun />
</Icon>
</Button>
<Button
className={classNames({ [styles.active]: theme === 'dark' })}
onClick={() => saveTheme('dark')}
>
<Icon>
<Moon />
</Icon>
</Button>
</div>
);
}
export default ThemeSetting;