import { useState } from 'react'; import * as React from 'react'; import { renderMarkdown } from '@grafana/data'; import { Alert } from '@grafana/ui'; import { CatalogPlugin } from '../types'; type Props = { className?: string; plugin: CatalogPlugin; }; export function PluginDetailsDeprecatedWarning(props: Props): React.ReactElement | null { const { className, plugin } = props; const [dismissed, setDismissed] = useState(false); const isWarningVisible = plugin.isDeprecated && !dismissed; return isWarningVisible ? ( setDismissed(true)}>

This {plugin.type} plugin is{' '} deprecated {' '} and has been removed from the catalog.

{/* Additional contextual deprecation message supporting markdown */} {plugin.details?.statusContext && (
)} ) : null; }