From 345cbcef0dece90c130f1eb905ca907b685c3dd0 Mon Sep 17 00:00:00 2001 From: Chang Wei Date: Tue, 5 Jul 2022 19:36:04 -0700 Subject: [PATCH 1/5] style: fix size of close icon on Modal header (#36309) * fix: update default.less, set the @modal-header-close-size to @modal-header-title-line-height + 2 * @modal-header-padding-vertical to keep the close icon in the center of vertical Signed-off-by: Chang Wei * fix: update variable.less, set the @modal-header-close-size to @modal-header-title-line-height + 2 * @modal-header-padding-vertical to keep the close icon in the center of vertical Signed-off-by: Chang Wei * fix: update compact.less, set the @modal-header-close-size to @modal-header-title-line-height + 2 * @modal-header-padding-vertical to keep the close icon in the center of vertical Signed-off-by: Chang Wei --- components/style/themes/compact.less | 5 +++-- components/style/themes/default.less | 2 +- components/style/themes/variable.less | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/components/style/themes/compact.less b/components/style/themes/compact.less index 36d6bbe053..5f4dc860fe 100644 --- a/components/style/themes/compact.less +++ b/components/style/themes/compact.less @@ -186,9 +186,10 @@ // Modal // -- -@modal-header-padding: 11px @modal-header-padding-horizontal; +@modal-header-padding-vertical: 11px; +@modal-header-padding: @modal-header-padding-vertical @modal-header-padding-horizontal; @modal-footer-padding-vertical: @padding-sm; -@modal-header-close-size: 44px; +@modal-header-close-size: @modal-header-title-line-height + 2 * @modal-header-padding-vertical; @modal-confirm-body-padding: 24px 24px 16px; // Message diff --git a/components/style/themes/default.less b/components/style/themes/default.less index 5aca1cb697..3752a77b24 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -561,7 +561,7 @@ @modal-header-title-line-height: 22px; @modal-header-title-font-size: @font-size-lg; @modal-header-border-color-split: @border-color-split; -@modal-header-close-size: 56px; +@modal-header-close-size: @modal-header-title-line-height + 2 * @modal-header-padding-vertical; @modal-content-bg: @component-background; @modal-heading-color: @heading-color; @modal-close-color: @text-color-secondary; diff --git a/components/style/themes/variable.less b/components/style/themes/variable.less index 4082dd525b..0ec856d927 100644 --- a/components/style/themes/variable.less +++ b/components/style/themes/variable.less @@ -616,7 +616,7 @@ @modal-header-title-line-height: 22px; @modal-header-title-font-size: @font-size-lg; @modal-header-border-color-split: @border-color-split; -@modal-header-close-size: 56px; +@modal-header-close-size: @modal-header-title-line-height + 2 * @modal-header-padding-vertical; @modal-content-bg: @component-background; @modal-heading-color: @heading-color; @modal-close-color: @text-color-secondary; From 2e04982882ddc08b67eb8d250347e835c5beb165 Mon Sep 17 00:00:00 2001 From: Kirill Barsukov <43782731+KirillSBarsukov@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:28:27 -0400 Subject: [PATCH 2/5] Update index.en-US.md (#36400) Fixed a typo --- components/form/index.en-US.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/form/index.en-US.md b/components/form/index.en-US.md index ec0110ea83..a2e346fee1 100644 --- a/components/form/index.en-US.md +++ b/components/form/index.en-US.md @@ -495,7 +495,7 @@ React can not get correct interaction of controlled component with async value u See similar issues: [#28370](https://github.com/ant-design/ant-design/issues/28370) [#27994](https://github.com/ant-design/ant-design/issues/27994) -`scrollToFirstError` and `scrollToField` deps on `id` attribute passed to form control, please mark sure that it hasn't been ignored in your custom form control. Check [codesandbox](https://codesandbox.io/s/antd-reproduction-template-forked-25nul?file=/index.js) for solution. +`scrollToFirstError` and `scrollToField` deps on `id` attribute passed to form control, please make sure that it hasn't been ignored in your custom form control. Check [codesandbox](https://codesandbox.io/s/antd-reproduction-template-forked-25nul?file=/index.js) for solution. ### `setFieldsValue` do not trigger `onFieldsChange` or `onValuesChange`? From e262ae8133d3a0c84d82aefa39b9f10b5b51f794 Mon Sep 17 00:00:00 2001 From: hsk-kr <57546034+hsk-kr@users.noreply.github.com> Date: Thu, 7 Jul 2022 00:29:57 +0900 Subject: [PATCH 3/5] docs: fix customize calendar example (#36356) * docs: fix customize calendar example * test: changed calendar snapshot Co-authored-by: lico --- .../__snapshots__/demo-extend.test.ts.snap | 4 ++-- components/calendar/demo/customize-header.md | 23 +++++++++---------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/components/calendar/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/calendar/__tests__/__snapshots__/demo-extend.test.ts.snap index 75b231e364..d4148c549c 100644 --- a/components/calendar/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/calendar/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -3481,8 +3481,8 @@ exports[`renders ./components/calendar/demo/customize-header.md extend context c />
{ months.push(localeData.monthsShort(current)); } - for (let index = start; index < end; index++) { + for (let i = start; i < end; i++) { monthOptions.push( - - {months[index]} + + {months[i]} , ); } - const month = value.month(); - + const year = value.year(); + const month = value.month(); const options = []; for (let i = year - 10; i < year + 10; i += 1) { options.push( @@ -78,11 +78,11 @@ const App: React.FC = () => { size="small" dropdownMatchSelectWidth={false} className="my-year-select" + value={year} onChange={newYear => { - const now = value.clone().year(Number(newYear)); + const now = value.clone().year(newYear); onChange(now); }} - value={String(year)} > {options} @@ -91,11 +91,10 @@ const App: React.FC = () => {