mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-18 10:17:16 +00:00
* Add condition for showing quick start carousel * Show coach mark when carousel is closed * Add condition for showing quick start carousel and other UI changes * Fix compile error * Fix issue with coach mark * Fix test * Add new sample data, fix link url, fix e2e tests * Fix e2e tests
25 lines
948 B
TypeScript
25 lines
948 B
TypeScript
import { Collection } from "Contracts/ViewModels";
|
|
import create, { UseStore } from "zustand";
|
|
|
|
interface TeachingBubbleState {
|
|
step: number;
|
|
isSampleDBExpanded: boolean;
|
|
isDocumentsTabOpened: boolean;
|
|
sampleCollection: Collection;
|
|
setStep: (step: number) => void;
|
|
setIsSampleDBExpanded: (isReady: boolean) => void;
|
|
setIsDocumentsTabOpened: (isOpened: boolean) => void;
|
|
setSampleCollection: (sampleCollection: Collection) => void;
|
|
}
|
|
|
|
export const useTeachingBubble: UseStore<TeachingBubbleState> = create((set) => ({
|
|
step: 1,
|
|
isSampleDBExpanded: false,
|
|
isDocumentsTabOpened: false,
|
|
sampleCollection: undefined,
|
|
setStep: (step: number) => set({ step }),
|
|
setIsSampleDBExpanded: (isSampleDBExpanded: boolean) => set({ isSampleDBExpanded }),
|
|
setIsDocumentsTabOpened: (isDocumentsTabOpened: boolean) => set({ isDocumentsTabOpened }),
|
|
setSampleCollection: (sampleCollection: Collection) => set({ sampleCollection }),
|
|
}));
|