RadioButton: fixes height of radio button after recent design changes (#33147)

This commit is contained in:
Torkel Ödegaard 2021-04-20 10:47:56 +02:00 committed by GitHub
parent bebc48c1f6
commit c67737905e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ const getRadioButtonStyles = stylesFactory((theme: GrafanaTheme, size: RadioButt
const textColorHover = theme.v2.palette.text.primary;
const bg = theme.v2.components.input.background;
// remove the group inner padding (set on RadioButtonGroup)
const labelHeight = height * theme.v2.spacing.gridSize - 4;
const labelHeight = height * theme.v2.spacing.gridSize - 4 - 2;
return {
radio: css`
@ -95,7 +95,7 @@ const getRadioButtonStyles = stylesFactory((theme: GrafanaTheme, size: RadioButt
font-size: ${fontSize};
height: ${labelHeight}px;
// Deduct border from line-height for perfect vertical centering on windows and linux
line-height: ${labelHeight - 2}px;
line-height: ${labelHeight}px;
color: ${textColor};
padding: ${theme.v2.spacing(0, padding)};
border-radius: ${theme.v2.shape.borderRadius()};