Skip to content

Commit b86dc20

Browse files
authored
fix: top/left align icon in s2 badge (#7691)
* fix: top/left align icon in s2 badge * center icon only badge
1 parent e3ed3c7 commit b86dc20

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
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: 'center',
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)