import React from 'react'; import { Modal, stylesFactory, useStyles } from '@grafana/ui'; import { GrafanaTheme } from '@grafana/data'; import { css } from '@emotion/css'; interface Props { pluginName: string; pluginID: string; onConfirm?: () => void; onDismiss?: () => void; } export function UpdatePluginModal({ pluginName, pluginID, onDismiss }: Props) { const styles = useStyles(getStyles); return (

Type the following on the command line to update {pluginName}.

          grafana-cli plugins update {pluginID}
        
Check out {pluginName} on Grafana.com for README and changelog. If you do not have access to the command line, ask your Grafana administator.

Pro tip: To update all plugins at once, type{' '} grafana-cli plugins update-all on the command line.

); } const getStyles = stylesFactory((theme: GrafanaTheme) => ({ small: css` font-size: ${theme.typography.size.sm}; font-weight: ${theme.typography.weight.regular}; `, codeSmall: css` font-size: ${theme.typography.size.xs}; padding: ${theme.spacing.xxs}; margin: 0 ${theme.spacing.xxs}; `, container: css` margin-bottom: calc(${theme.spacing.d} * 2.5); `, updateAllTip: css` color: ${theme.colors.textWeak}; font-size: ${theme.typography.size.sm}; `, inlineLogo: css` vertical-align: sub; margin-right: calc(${theme.spacing.d} / 3); width: ${theme.spacing.md}; `, }));