mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 01:12:22 +08:00
ToolTip: Fix flexbox bug with tooltip when maxWidth
is set manually (#107145)
Fix flexbox bug with tooltip when maxWidth is set manually. fix for #105517 Co-authored-by: Jason <jdmarshall@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
c80fe53620
commit
cff743fcd5
@ -56,9 +56,11 @@ export const VizTooltipColorIndicator = ({
|
||||
const getStyles = (theme: GrafanaTheme2) => ({
|
||||
leading: css({
|
||||
marginRight: theme.spacing(0.5),
|
||||
flex: 'none',
|
||||
}),
|
||||
trailing: css({
|
||||
marginLeft: theme.spacing(0.5),
|
||||
flex: 'none',
|
||||
}),
|
||||
value: css({
|
||||
width: '12px',
|
||||
|
@ -129,7 +129,7 @@ export const VizTooltipRow = ({
|
||||
return (
|
||||
<div className={styles.contentWrapper}>
|
||||
{(color || label) && (
|
||||
<div className={styles.valueWrapper}>
|
||||
<div className={styles.labelWrapper}>
|
||||
{color && colorPlacement === ColorPlacement.first && (
|
||||
<VizTooltipColorIndicator color={color} colorIndicator={colorIndicator} lineStyle={lineStyle} />
|
||||
)}
|
||||
@ -221,6 +221,12 @@ const getStyles = (theme: GrafanaTheme2, justify: string, marginRight: string) =
|
||||
overflow: 'hidden',
|
||||
marginRight: theme.spacing(2),
|
||||
}),
|
||||
labelWrapper: css({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
flex: '2',
|
||||
minWidth: 0,
|
||||
}),
|
||||
value: css({
|
||||
fontWeight: 500,
|
||||
textOverflow: 'ellipsis',
|
||||
@ -229,6 +235,7 @@ const getStyles = (theme: GrafanaTheme2, justify: string, marginRight: string) =
|
||||
valueWrapper: css({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
flex: '1',
|
||||
}),
|
||||
activeSeries: css({
|
||||
fontWeight: theme.typography.fontWeightBold,
|
||||
|
Reference in New Issue
Block a user