mirror of
https://github.com/cfngc4594/monaco-editor-lsp-next.git
synced 2026-10-15 15:17:29 +00:00
feat(dockview): add Zustand store for dockview API management
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { create } from "zustand";
|
||||
import type { DockviewApi } from "dockview";
|
||||
|
||||
export type DockviewState = {
|
||||
api: DockviewApi | null;
|
||||
};
|
||||
|
||||
export type DockviewActions = {
|
||||
setApi: (api: DockviewApi) => void;
|
||||
};
|
||||
|
||||
export type DockviewStore = DockviewState & DockviewActions;
|
||||
|
||||
export const useDockviewStore = create<DockviewStore>()((set) => ({
|
||||
api: null,
|
||||
setApi: (api) => set({ api }),
|
||||
}));
|
||||
Reference in New Issue
Block a user