platform-codebase/features/feature-flags/shared/src/react.ts

30 lines
681 B
TypeScript
Executable file

/**
* React-only exports for @lilith/feature-flags
*
* Import from '@lilith/feature-flags/react' for tree-shaking
* when you only need React components.
*/
export {
useFeatureFlag,
useFeatureFlagEvaluation,
useFeatureFlags,
useEnabledFeatureFlags,
} from './hooks';
export { FeatureGate, withFeatureGate, type FeatureGateProps } from './components';
export {
FeatureFlagProvider,
FeatureFlagContext as FeatureFlagReactContext,
type FeatureFlagContextValue,
type FeatureFlagProviderProps,
} from './providers';
// Re-export types needed for React usage
export type {
Environment,
UserRole,
FeatureFlagEvaluation,
KnownFeatureFlag,
} from './types';