feature-toggle-jsx
Version:
Toggle component on/off based on feature configuration
10 lines (9 loc) • 494 B
TypeScript
import * as React from 'react';
import { FeatureConfig } from '../FeaturesContext';
interface OwnProps<T> {
features: T;
}
declare type Props<T> = React.PropsWithChildren<OwnProps<T>>;
export declare type FeaturesProviderComponent<T extends FeatureConfig> = React.FC<Props<T>>;
declare const FeaturesProvider: React.MemoExoticComponent<(<T extends Record<string, Record<string | number, any>>>(props: React.PropsWithChildren<OwnProps<T>>) => JSX.Element)>;
export default FeaturesProvider;