Files
mnote/src/store/page-layout.ts
T

19 lines
441 B
TypeScript

"use client";
import { create } from "zustand";
interface PageLayoutState {
showInspector: boolean;
toggleInspector: () => void;
setInspector: (visible: boolean) => void;
}
export const usePageLayoutStore = create<PageLayoutState>((set) => ({
showInspector: true,
toggleInspector: () =>
set((state) => ({
showInspector: !state.showInspector,
})),
setInspector: (visible) => set({ showInspector: visible }),
}));