mirror of
https://github.com/docmost/docmost.git
synced 2026-05-19 07:54:05 +08:00
233536314f
* chore: add table of contents module * refactor * lint * null check --------- Co-authored-by: Philipinho <16838612+Philipinho@users.noreply.github.com>
23 lines
532 B
TypeScript
23 lines
532 B
TypeScript
import { atomWithWebStorage } from "@/lib/jotai-helper.ts";
|
|
import { atom } from "jotai";
|
|
|
|
export const mobileSidebarAtom = atom<boolean>(false);
|
|
|
|
export const desktopSidebarAtom = atomWithWebStorage<boolean>(
|
|
"showSidebar",
|
|
true,
|
|
);
|
|
|
|
export const desktopAsideAtom = atom<boolean>(false);
|
|
|
|
type AsideStateType = {
|
|
tab: string;
|
|
isAsideOpen: boolean;
|
|
};
|
|
|
|
export const asideStateAtom = atom<AsideStateType>({
|
|
tab: "",
|
|
isAsideOpen: false,
|
|
});
|
|
|
|
export const sidebarWidthAtom = atomWithWebStorage<number>('sidebarWidth', 300); |