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:
10
front/src/modules/ui/layout/states/isNavbarOpenedState.ts
Normal file
10
front/src/modules/ui/layout/states/isNavbarOpenedState.ts
Normal 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,
|
||||
});
|
||||
@ -0,0 +1,6 @@
|
||||
import { atom } from 'recoil';
|
||||
|
||||
export const isThemeEnabledState = atom<boolean>({
|
||||
key: 'isThemeEnabledState',
|
||||
default: true,
|
||||
});
|
||||
@ -1,6 +0,0 @@
|
||||
import { atom } from 'recoil';
|
||||
|
||||
export const themeEnabledState = atom<boolean>({
|
||||
key: 'ui/theme-enabled',
|
||||
default: true,
|
||||
});
|
||||
Reference in New Issue
Block a user