teams: feature toggle component

This commit is contained in:
Hugo Häggmark
2019-03-08 10:46:52 +01:00
committed by Leonard Gram
parent aedc478208
commit 467b7a40d8
3 changed files with 453 additions and 392 deletions

View File

@@ -0,0 +1,13 @@
import React, { FunctionComponent } from 'react';
export interface Props {
featureToggle: boolean;
}
export const WithFeatureToggle: FunctionComponent<Props> = ({ featureToggle, children }) => {
if (featureToggle === true) {
return <>{children}</>;
}
return null;
};