mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-08 00:26:37 +08:00
[重构] 前端改造v1
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { create } from 'zustand';
|
||||
|
||||
interface AppShellState {
|
||||
isSidebarCollapsed: boolean;
|
||||
toggleSidebar: () => void;
|
||||
setSidebarCollapsed: (value: boolean) => void;
|
||||
}
|
||||
|
||||
export const useAppShellStore = create<AppShellState>((set) => ({
|
||||
isSidebarCollapsed: false,
|
||||
toggleSidebar: () =>
|
||||
set((state) => ({
|
||||
isSidebarCollapsed: !state.isSidebarCollapsed,
|
||||
})),
|
||||
setSidebarCollapsed: (value) => set({ isSidebarCollapsed: value }),
|
||||
}));
|
||||
Reference in New Issue
Block a user