Storybook: Fix checkbox spacing (#27980)

* Remove <br> and add line-height

* use theme line-height instead of custom
This commit is contained in:
Lundbyit 2020-10-02 15:07:47 +02:00 committed by GitHub
parent b4b3f6a088
commit 2c1c4d613c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,7 @@ export const getCheckboxStyles = stylesFactory((theme: GrafanaTheme) => {
description: cx(
labelStyles.description,
css`
line-height: ${theme.typography.lineHeight.sm};
padding-left: ${theme.spacing.formSpacingBase}px;
`
),
@ -117,12 +118,7 @@ export const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(
/>
<span className={styles.checkmark} />
{label && <span className={styles.label}>{label}</span>}
{description && (
<>
<br />
<span className={styles.description}>{description}</span>
</>
)}
{description && <span className={styles.description}>{description}</span>}
</label>
);
}