feat: responsive ui above 640px (#1741)

This commit is contained in:
Peng Xiao
2023-03-31 09:12:18 +08:00
committed by GitHub
parent bdb1264f09
commit c55d61a641
22 changed files with 443 additions and 190 deletions

View File

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