UNPKG

@patreon/studio

Version:

Patreon Studio Design System

19 lines (18 loc) 773 B
import React from 'react'; import type { ChildrenProps } from '../../types/component'; declare const SUPPORTED_FEATURE_FLAGS: readonly ["updated_text_link_style", "disable_responsive_typescale"]; declare type FeatureFlagId = (typeof SUPPORTED_FEATURE_FLAGS)[number]; export declare type FeatureFlagsRecord = Partial<Record<FeatureFlagId, boolean>>; interface FeatureFlagContext { featureFlags: FeatureFlagsRecord; } declare const FeatureFlagContext: React.Context<FeatureFlagContext>; /** * Provider for feature flags */ export declare function FeatureFlagProvider({ featureFlags, children }: FeatureFlagContext & ChildrenProps): React.JSX.Element; /** * Hook to use feature flags */ export declare function useFeatureFlag(name: FeatureFlagId): boolean; export {};