StatPanel: Fixed center of values in edge case scenarios (#28968)

pull/28998/head
Torkel Ödegaard 5 years ago committed by GitHub
parent 7a4550df56
commit 91eac6e7af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/grafana-ui/src/components/BigValue/BigValueLayout.tsx
  2. 1
      packages/grafana-ui/src/components/BigValue/__snapshots__/BigValue.test.tsx.snap

@ -67,6 +67,10 @@ export abstract class BigValueLayout {
zIndex: 1,
};
if (this.justifyCenter) {
styles.textAlign = 'center';
}
switch (this.props.colorMode) {
case BigValueColorMode.Value:
styles.color = this.valueColor;

@ -35,6 +35,7 @@ exports[`BigValue Render with basic options should render 1`] = `
"fontWeight": 500,
"lineHeight": 1.2,
"position": "relative",
"textAlign": "center",
"zIndex": 1,
}
}

Loading…
Cancel
Save