style: Badge align style with text under Space (#47908)

This commit is contained in:
afc163 2024-03-16 17:45:50 +08:00 committed by GitHub
parent b64db3cd70
commit a8fb31cbd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,7 +14,7 @@ interface SpaceToken extends FullToken<'Space'> {
}
const genSpaceStyle: GenerateStyle<SpaceToken> = (token) => {
const { componentCls } = token;
const { componentCls, antCls } = token;
return {
[componentCls]: {
@ -43,6 +43,10 @@ const genSpaceStyle: GenerateStyle<SpaceToken> = (token) => {
[`${componentCls}-item:empty`]: {
display: 'none',
},
// https://github.com/ant-design/ant-design/issues/47875
[`${componentCls}-item > ${antCls}-badge-not-a-wrapper:only-child`]: {
display: 'block',
},
},
};
};