mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
14 lines
282 B
TypeScript
14 lines
282 B
TypeScript
|
import React, { FunctionComponent } from 'react';
|
||
|
|
||
|
export interface Props {
|
||
|
featureToggle: boolean;
|
||
|
}
|
||
|
|
||
|
export const WithFeatureToggle: FunctionComponent<Props> = ({ featureToggle, children }) => {
|
||
|
if (featureToggle === true) {
|
||
|
return <>{children}</>;
|
||
|
}
|
||
|
|
||
|
return null;
|
||
|
};
|