Skip to content

Commit

Permalink
Fix(Badge): Fixes the Badge height for the label version. Both label …
Browse files Browse the repository at this point in the history
…and counter variants are now 24px in height. (#1228)
  • Loading branch information
chris-cedrone-cengage authored Apr 15, 2024
1 parent 32eff37 commit e8a395e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fix-BadgeHeight.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'react-magma-dom': patch
---

fix(Badge): Fixes the Badge height for the label version. Both label and counter variants are now 24px in height.
4 changes: 4 additions & 0 deletions packages/react-magma-dom/src/components/Badge/Badge.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ describe('Badge', () => {
'background',
magma.colors.primary
);
expect(getByText(TEXT)).toHaveStyleRule(
'padding',
`3px ${magma.spaceScale.spacing02}`
);
});

describe('inverse', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-magma-dom/src/components/Badge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const baseBadgeStyles = props => css`
min-width: ${props.theme.spaceScale.spacing06};
padding: ${props.variant === BadgeVariant.counter
? `1px ${props.theme.spaceScale.spacing02}`
: `${props.theme.spaceScale.spacing01} ${props.theme.spaceScale.spacing02}`};
: `3px ${props.theme.spaceScale.spacing02}`};
text-align: ${props.variant == BadgeVariant.counter ? 'center' : 'inherit'};
`;

Expand Down

2 comments on commit e8a395e

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.