Files
twenty/front/src/modules/ui/layout/states/isNavbarOpenedState.ts
Félix Malfait f6e1e626fd 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
2023-06-09 15:09:21 +02:00

11 lines
242 B
TypeScript

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,
});