From ddb97b22ba319e1c44cf7a8fb6de7ac96235df7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Thu, 28 Jul 2022 20:30:41 +0800 Subject: [PATCH] chore: collapse title text auto width (#36761) * chore: collapse title text auto width * test: fix mock snapshot --- components/collapse/style/index.less | 5 + .../__snapshots__/demo-extend.test.tsx.snap | 370 +++++++++--------- tests/shared/demoTest.tsx | 5 +- 3 files changed, 193 insertions(+), 187 deletions(-) diff --git a/components/collapse/style/index.less b/components/collapse/style/index.less index 5cecd1fc7e..2cccb86fbb 100644 --- a/components/collapse/style/index.less +++ b/components/collapse/style/index.less @@ -43,6 +43,10 @@ } } + .@{collapse-prefix-cls}-header-text { + flex: auto; + } + .@{collapse-prefix-cls}-extra { margin-left: auto; } @@ -55,6 +59,7 @@ .@{collapse-prefix-cls}-header-collapsible-only { cursor: default; .@{collapse-prefix-cls}-header-text { + flex: none; cursor: pointer; } } diff --git a/components/drawer/__tests__/__snapshots__/demo-extend.test.tsx.snap b/components/drawer/__tests__/__snapshots__/demo-extend.test.tsx.snap index 6e0aaf7521..85c307577f 100644 --- a/components/drawer/__tests__/__snapshots__/demo-extend.test.tsx.snap +++ b/components/drawer/__tests__/__snapshots__/demo-extend.test.tsx.snap @@ -1384,14 +1384,14 @@ HTMLCollection [ tabindex="-1" type="button" > - Jul + Nov