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

This commit is contained in:
Torkel Ödegaard 2020-11-10 15:38:25 +01:00 committed by GitHub
parent 7a4550df56
commit 91eac6e7af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -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;

View File

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