import React from 'react'; import { featureEnabled } from '@grafana/runtime'; import { Badge, Button, HorizontalGroup, PluginSignatureBadge, useStyles2 } from '@grafana/ui'; import { CatalogPlugin } from '../../types'; import { getBadgeColor } from './sharedStyles'; type Props = { plugin: CatalogPlugin }; export function PluginEnterpriseBadge({ plugin }: Props): React.ReactElement { const customBadgeStyles = useStyles2(getBadgeColor); const onClick = (ev: React.MouseEvent) => { ev.preventDefault(); window.open( `https://grafana.com/grafana/plugins/${plugin.id}?utm_source=grafana_catalog_learn_more`, '_blank', 'noopener,noreferrer' ); }; if (featureEnabled('enterprise.plugins')) { return ; } return ( ); }