mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
teams: feature toggle component
This commit is contained in:
committed by
Leonard Gram
parent
aedc478208
commit
467b7a40d8
13
public/app/core/components/WithFeatureToggle.tsx
Normal file
13
public/app/core/components/WithFeatureToggle.tsx
Normal 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;
|
||||
};
|
Reference in New Issue
Block a user