Files
calendar/packages/features/shell/stores/gatedFeaturesStore.ts
T
Amit SharmaGitHubcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>Udit Takkar
44104e1ba4 feat: gated features modal (#25296)
* feat: Modal for gated features

* use zustand

* refactor

* Apply suggestions from code review

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* Update packages/ui/components/card/Card.tsx

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* dismiss button fix and url fix

* fix: broken redirect to teams

* fix: type check and review comments

* add learn more tracking back

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2025-12-11 11:14:31 +01:00

20 lines
517 B
TypeScript

import { create } from "zustand";
export enum GatedFeatures {
RolesAndPermissions = "roles_and_permissions",
}
type GatedFeaturesStore = {
isOpen: boolean;
activeFeature: GatedFeatures | null;
open: (feature: GatedFeatures) => void;
close: () => void;
};
export const useGatedFeaturesStore = create<GatedFeaturesStore>((set) => ({
isOpen: false,
activeFeature: null,
open: (feature) => set({ isOpen: true, activeFeature: feature }),
close: () => set({ isOpen: false, activeFeature: null }),
}));