Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import { create } from "zustand";
|
||||
import { ThemeConfig } from "~/utils/theme/ThemeConfig";
|
||||
|
||||
interface ThemePreviewState {
|
||||
isPreviewActive: boolean;
|
||||
previewTheme: string | null;
|
||||
previewConfig: ThemeConfig | null;
|
||||
setPreviewTheme: (theme: string | null) => void;
|
||||
setPreviewConfig: (config: ThemeConfig | null) => void;
|
||||
enablePreview: () => void;
|
||||
disablePreview: () => void;
|
||||
resetPreview: () => void;
|
||||
}
|
||||
|
||||
export const useThemePreviewStore = create<ThemePreviewState>((set) => ({
|
||||
isPreviewActive: false,
|
||||
previewTheme: null,
|
||||
previewConfig: null,
|
||||
|
||||
setPreviewTheme: (theme) => set({ previewTheme: theme }),
|
||||
|
||||
setPreviewConfig: (config) => set({ previewConfig: config }),
|
||||
|
||||
enablePreview: () => set({ isPreviewActive: true }),
|
||||
|
||||
disablePreview: () =>
|
||||
set({
|
||||
isPreviewActive: false,
|
||||
previewTheme: null,
|
||||
previewConfig: null,
|
||||
}),
|
||||
|
||||
resetPreview: () =>
|
||||
set({
|
||||
previewTheme: null,
|
||||
previewConfig: null,
|
||||
}),
|
||||
}));
|
||||
Reference in new issue
Block a user