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

19 lines
442 B
TypeScript
Raw Normal View History

2025-11-23 10:55:04 +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: false,
2025-11-23 10:55:04 +08:00
toggleInspector: () =>
set((state) => ({
showInspector: !state.showInspector,
})),
setInspector: (visible) => set({ showInspector: visible }),
}));