diff --git a/public/app/features/panel/components/VizTypePicker/PanelTypeCard.tsx b/public/app/features/panel/components/VizTypePicker/PanelTypeCard.tsx index 7b3c9c57b5f2..7ab30364d90b 100644 --- a/public/app/features/panel/components/VizTypePicker/PanelTypeCard.tsx +++ b/public/app/features/panel/components/VizTypePicker/PanelTypeCard.tsx @@ -29,9 +29,10 @@ export const PanelTypeCard: React.FC = ({ children, }) => { const styles = useStyles2(getStyles); + const isDisabled = disabled || plugin.state === PluginState.deprecated; const cssClass = cx({ [styles.item]: true, - [styles.disabled]: disabled || plugin.state === PluginState.deprecated, + [styles.itemDisabled]: isDisabled, [styles.current]: isCurrent, }); @@ -39,18 +40,18 @@ export const PanelTypeCard: React.FC = ({
- + -
+
{title}
{description ? {description} : null} {children}
{showBadge && ( -
+
)} @@ -100,13 +101,21 @@ const getStyles = (theme: GrafanaTheme2) => { position: relative; padding: ${theme.spacing(0, 1)}; `, + itemDisabled: css` + cursor: default; + + &, + &:hover { + background: ${theme.colors.action.disabledBackground}; + } + `, current: css` label: currentVisualizationItem; border: 1px solid ${theme.colors.primary.border}; background: ${theme.colors.action.selected}; `, disabled: css` - opacity: 0.2; + opacity: ${theme.colors.action.disabledOpacity}; filter: grayscale(1); cursor: default; pointer-events: none; @@ -138,6 +147,7 @@ const getStyles = (theme: GrafanaTheme2) => { background: ${theme.colors.background.primary}; `, deleteButton: css` + cursor: pointer; margin-left: auto; `, };