Skip to content

Commit

Permalink
style: Badge align style with text under Space (ant-design#47908)
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 authored and tanzhenyun committed Mar 29, 2024
1 parent 541b95e commit 0daf8fb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/space/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface SpaceToken extends FullToken<'Space'> {
}

const genSpaceStyle: GenerateStyle<SpaceToken> = (token) => {
const { componentCls } = token;
const { componentCls, antCls } = token;

return {
[componentCls]: {
Expand Down Expand Up @@ -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',
},
},
};
};
Expand Down

0 comments on commit 0daf8fb

Please sign in to comment.