mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
VisualizationLegend: Fixes item disabled color extends to stat values (#41786)
This commit is contained in:
parent
bce7cb3ebf
commit
d4bbaaade4
@ -58,7 +58,7 @@ export const VizLegendListItem = <T extends unknown = any>({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cx(styles.itemWrapper, className)}
|
className={cx(styles.itemWrapper, item.disabled && styles.itemDisabled, className)}
|
||||||
aria-label={selectors.components.VizLegend.seriesName(item.label)}
|
aria-label={selectors.components.VizLegend.seriesName(item.label)}
|
||||||
>
|
>
|
||||||
<VizLegendSeriesIcon seriesName={item.label} color={item.color} gradient={item.gradient} readonly={readonly} />
|
<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}
|
onMouseEnter={onMouseEnter}
|
||||||
onMouseOut={onMouseOut}
|
onMouseOut={onMouseOut}
|
||||||
onClick={!readonly ? onClick : undefined}
|
onClick={!readonly ? onClick : undefined}
|
||||||
className={cx(styles.label, item.disabled && styles.labelDisabled, !readonly && styles.clickable)}
|
className={cx(styles.label, !readonly && styles.clickable)}
|
||||||
>
|
>
|
||||||
{item.label}
|
{item.label}
|
||||||
</div>
|
</div>
|
||||||
@ -87,7 +87,7 @@ const getStyles = (theme: GrafanaTheme) => ({
|
|||||||
label: LegendClickabel;
|
label: LegendClickabel;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
`,
|
`,
|
||||||
labelDisabled: css`
|
itemDisabled: css`
|
||||||
label: LegendLabelDisabled;
|
label: LegendLabelDisabled;
|
||||||
color: ${theme.colors.linkDisabled};
|
color: ${theme.colors.linkDisabled};
|
||||||
`,
|
`,
|
||||||
|
Loading…
Reference in New Issue
Block a user