Skip to content

Commit

Permalink
feat: Add xsmall badge size
Browse files Browse the repository at this point in the history
  • Loading branch information
hxltrhuxze committed Mar 9, 2020
1 parent a3d1f1f commit f8b3eaf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions packages/css-framework/src/components/_badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ $badge: (
);

$badge-sizes: (
xsmall: (
font-size: f.font-size("xs"),
font-weight: 700,
line-height: 1.4,
padding: f.spacing("px") f.spacing("2"),
padding-pill: f.spacing("px") f.spacing("2")
),
small: (
font-size: f.font-size("s"),
font-weight: 700,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const badgeColorTextMap = {
}

const badgeSizeTextMap = {
[BADGE_SIZE.XSMALL]: 'XSmall',
[BADGE_SIZE.SMALL]: 'Small',
[BADGE_SIZE.REGULAR]: 'Regular',
[BADGE_SIZE.LARGE]: 'Large',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type BadgeColorType =
| typeof BADGE_COLOR.WARNING

export type BadgeSizeType =
| typeof BADGE_SIZE.XSMALL
| typeof BADGE_SIZE.SMALL
| typeof BADGE_SIZE.REGULAR
| typeof BADGE_SIZE.LARGE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ const BADGE_COLOR_VARIANT = {
} as const

const BADGE_SIZE = {
LARGE: 'large',
XSMALL: 'xsmall',
SMALL: 'small',
REGULAR: 'regular',
LARGE: 'large',
XLARGE: 'xlarge',
} as const

Expand Down

0 comments on commit f8b3eaf

Please sign in to comment.