mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 00:25:46 -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;
|
|
};
|