VisualizationLegend: Fixes item disabled color extends to stat values (#41786)

This commit is contained in:
Torkel Ödegaard 2021-11-17 09:44:08 +01:00 committed by GitHub
parent bce7cb3ebf
commit d4bbaaade4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,7 @@ export const VizLegendListItem = <T extends unknown = any>({
return (
<div
className={cx(styles.itemWrapper, className)}
className={cx(styles.itemWrapper, item.disabled && styles.itemDisabled, className)}
aria-label={selectors.components.VizLegend.seriesName(item.label)}
>
<VizLegendSeriesIcon seriesName={item.label} color={item.color} gradient={item.gradient} readonly={readonly} />
@ -66,7 +66,7 @@ export const VizLegendListItem = <T extends unknown = any>({
onMouseEnter={onMouseEnter}
onMouseOut={onMouseOut}
onClick={!readonly ? onClick : undefined}
className={cx(styles.label, item.disabled && styles.labelDisabled, !readonly && styles.clickable)}
className={cx(styles.label, !readonly && styles.clickable)}
>
{item.label}
</div>
@ -87,7 +87,7 @@ const getStyles = (theme: GrafanaTheme) => ({
label: LegendClickabel;
cursor: pointer;
`,
labelDisabled: css`
itemDisabled: css`
label: LegendLabelDisabled;
color: ${theme.colors.linkDisabled};
`,