From 52d91cec3f64fd1c9a4914995799b9038e747e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=8B?= <94534613+BoyYangzai@users.noreply.github.com> Date: Tue, 9 May 2023 10:09:20 +0800 Subject: [PATCH 1/3] fix(style): keep checkbox.group style the same as v4 (#42103) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(style): keep checkbox.group style the same as v4 * fix(style): flex-wrap and colgap * chore: change style grid same as v4 * fix: lint * chore: add token --------- Co-authored-by: 洋 --- components/checkbox/style/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/checkbox/style/index.ts b/components/checkbox/style/index.ts index 8d42050eba..3be7b90947 100644 --- a/components/checkbox/style/index.ts +++ b/components/checkbox/style/index.ts @@ -36,6 +36,13 @@ export const genCheckboxStyle: GenerateStyle = (token) => { ...resetComponent(token), display: 'inline-flex', + flexWrap: 'wrap', + columnGap: token.marginXS, + + // Group > Grid + [`> ${token.antCls}-row`]: { + flex: 1, + }, }, // Wrapper @@ -56,7 +63,7 @@ export const genCheckboxStyle: GenerateStyle = (token) => { // Checkbox near checkbox [`& + ${wrapperCls}`]: { - marginInlineStart: token.marginXS, + marginInlineStart: 0, }, [`&${wrapperCls}-in-form-item`]: { From 24dd5351e90e6940dcdf81f0e783465574b8eb44 Mon Sep 17 00:00:00 2001 From: Ec-tracker <46723726+Ec-tracker@users.noreply.github.com> Date: Tue, 9 May 2023 11:18:23 +0800 Subject: [PATCH 2/3] fix: Space.Compact not work with CP component size (#42199) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test(space): add test cases * fix(Space.Compact): fix the size is not inherited from ConfigProvider when the componentSize is set * test(Space.Compact): move Space.Compact test cases to the corresponding folder * test: update snapshot --------- Co-authored-by: 二货机器人 --- .../__snapshots__/components.test.tsx.snap | 8 +++--- components/space/Compact.tsx | 4 ++- .../space/__tests__/space-compact.test.tsx | 26 +++++++++++++++++++ 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap b/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap index 70ff5a39d3..1137d25c4b 100644 --- a/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap +++ b/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap @@ -16831,7 +16831,7 @@ exports[`ConfigProvider components Dropdown configProvider componentSize large 1 class="config-space-compact config-space-compact-block config-dropdown-button" >