@atlaskit/editor-common
Version:
A package that contains common classes and components for editor and renderer
10 lines (9 loc) • 513 B
TypeScript
import React from 'react';
/**
* This function is used to switch between two components based on a feature flag
* @param ComponentOld
* @param ComponentNext
* @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('my_flag_name')
* @returns
*/
export declare const withFeatureFlaggedComponent: <P extends object>(ComponentOld: React.ComponentType<P>, ComponentNext: React.ComponentType<P>, featureFlagFn: () => boolean) => (props: P) => React.JSX.Element;