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

19 lines
441 B
TypeScript
Raw Normal View History

2025-11-23 10:45:45 +08:00
"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 }),
}));