mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 10:03:33 -06:00
14 lines
265 B
TypeScript
14 lines
265 B
TypeScript
import React from 'react';
|
|
|
|
export interface Props {
|
|
featureToggle: boolean;
|
|
}
|
|
|
|
export const WithFeatureToggle = ({ featureToggle, children }: React.PropsWithChildren<Props>) => {
|
|
if (featureToggle === true) {
|
|
return <>{children}</>;
|
|
}
|
|
|
|
return null;
|
|
};
|