Skip to content

Commit 55a44c9

Browse files
committed
center icon only badge
1 parent afc5d76 commit 55a44c9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/@react-spectrum/s2/src/Badge.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ const badge = style<BadgeStyleProps>({
6161
display: 'flex',
6262
font: 'control',
6363
justifyContent: 'center',
64-
alignItems: 'baseline',
64+
alignItems: {
65+
default: 'baseline',
66+
':has([slot=icon]:only-child)': 'center'
67+
},
6568
borderRadius: 'control',
6669
minHeight: 'control',
6770
paddingX: {

0 commit comments

Comments
 (0)