Skip to content

Commit

Permalink
fix(Chip): add fixed height
Browse files Browse the repository at this point in the history
To prevent unwanted expansion of Chips when used within Layout Primitives we decided to add fixed height.

Ref NOTICKET
  • Loading branch information
ajkl2533 committed Nov 11, 2024
1 parent cb2f137 commit 46e0ece
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Chip/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const ChipRoot = styled.div`
width: fit-content;
/* Size dependent */
height: var(--sscds-chip-size);
padding: var(--sscds-chip-padding-block);
border-radius: var(--sscds-chip-radius);
Expand Down
1 change: 1 addition & 0 deletions src/components/Chip/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const getCommonChipStyles = ({
size: Sizes;
color: PillColors;
}) => ({
'--sscds-chip-size': size === 'md' ? '2rem' : '1.5rem',
'--sscds-chip-padding-block':
size === 'md' ? 'var(--sscds-space-1x)' : '0 var(--sscds-space-half-x)',
'--sscds-chip-radius':
Expand Down

0 comments on commit 46e0ece

Please sign in to comment.