Commit 2c1c4d61 by Lundbyit Committed by GitHub

Storybook: Fix checkbox spacing (#27980)

* Remove <br> and add line-height

* use theme line-height instead of custom
parent b4b3f6a0
......@@ -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>
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment