Files
twenty_crm/packages/twenty-front/src/modules/ui/navigation/states/isNavigationDrawerOpenState.ts
Abdullah cfd83d6b8e [UI] Remove theme constants from twenty-front and use the ones exported from twenty-ui. (#5558)
Some parts of the Frontend used theme constants exported from
`modules/ui` while other parts used theme constants exported from
`twenty-ui`.

This PR centralizes theme constants by removing them from `modules/ui`
completely.
2024-05-25 16:09:25 +02:00

10 lines
242 B
TypeScript

import { atom } from 'recoil';
import { MOBILE_VIEWPORT } from 'twenty-ui';
const isMobile = window.innerWidth <= MOBILE_VIEWPORT;
export const isNavigationDrawerOpenState = atom({
key: 'isNavigationDrawerOpen',
default: !isMobile,
});