Make the sidebar collapsable (#260)

* Make the sidebar collapsable

* Fix padding

* Automatically collapase sidebar and hide container on mobile

* Hide navbar content when navbar is collapsed

* Update naming convention for states
This commit is contained in:
Félix Malfait
2023-06-09 15:09:21 +02:00
committed by GitHub
parent 1d6f1f4551
commit f6e1e626fd
18 changed files with 163 additions and 48 deletions

View File

@ -0,0 +1,10 @@
import { atom } from 'recoil';
import { MOBILE_VIEWPORT } from '../styles/themes';
const isMobile = window.innerWidth <= MOBILE_VIEWPORT;
export const isNavbarOpenedState = atom({
key: 'ui/isNavbarOpenedState',
default: !isMobile,
});

View File

@ -0,0 +1,6 @@
import { atom } from 'recoil';
export const isThemeEnabledState = atom<boolean>({
key: 'isThemeEnabledState',
default: true,
});

View File

@ -1,6 +0,0 @@
import { atom } from 'recoil';
export const themeEnabledState = atom<boolean>({
key: 'ui/theme-enabled',
default: true,
});