UNPKG

@patreon/studio

Version:

Patreon Studio Design System

19 lines (18 loc) 733 B
import React from 'react'; import type { ChildrenProps } from '~/types/component'; export declare const SUPPORTED_FEATURE_FLAGS: readonly ["disable_responsive_typescale"]; type FeatureFlagId = (typeof SUPPORTED_FEATURE_FLAGS)[number]; export 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 {};