grafana_bak/public/app/core/components/WithFeatureToggle.tsx
2025-04-01 10:38:02 +09:00

14 lines
270 B
TypeScript

import * as React from 'react';
export interface Props {
featureToggle: boolean;
}
export const WithFeatureToggle = ({ featureToggle, children }: React.PropsWithChildren<Props>) => {
if (featureToggle === true) {
return <>{children}</>;
}
return null;
};