mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
feat: responsive ui above 640px (#1741)
This commit is contained in:
@@ -1,8 +1,18 @@
|
||||
import { useAtom } from 'jotai';
|
||||
import { atom, useAtom } from 'jotai';
|
||||
import { atomWithStorage } from 'jotai/utils';
|
||||
|
||||
const sideBarOpenAtom = atomWithStorage('sidebarOpen', true);
|
||||
const sideBarWidthAtom = atomWithStorage('sidebarWidth', 256);
|
||||
const sidebarResizingAtom = atom(false);
|
||||
|
||||
export function useSidebarStatus() {
|
||||
return useAtom(sideBarOpenAtom);
|
||||
}
|
||||
|
||||
export function useSidebarWidth() {
|
||||
return useAtom(sideBarWidthAtom);
|
||||
}
|
||||
|
||||
export function useSidebarResizing() {
|
||||
return useAtom(sidebarResizingAtom);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user