Skip to content

Commit

Permalink
fix: the Badge component should be default act like an “inline” compo…
Browse files Browse the repository at this point in the history
…nent

Exception is when inside a table, for some reason display: grid positions correctly in that case.
  • Loading branch information
SimeonC committed Jul 1, 2024
1 parent 9dc9431 commit fb85b15
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion system/core/src/components/Badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const className = 'badge';
export const fullStyles = css`
width: max-content;
font: var(--label);
display: grid;
display: inline-grid;
grid-auto-flow: column;
gap: var(--spacing-l1);
align-items: center;
Expand All @@ -15,6 +15,10 @@ export const fullStyles = css`
color: var(--neutral-text);
background-color: var(--neutral-surface);
table & {
display: grid;
}
&[data-size='x-small'] {
padding: 2px 6px;
font-size: 12px;
Expand Down

0 comments on commit fb85b15

Please sign in to comment.