From 642bb582eb508597a03f2f16844ac4436f78f1a3 Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Wed, 11 Jan 2023 14:18:13 +0800 Subject: [PATCH] refactor: TextArea (#40045) * refactor: TextArea * chore: update snapshot * chore: update snapshot * chore: fix lint * chore: classes * refactor: mentions * chore: bump rc-textarea * chore: code clean * chore: code clean * chore: UPDATE SNAPSHOT * chore: code clean * test: cov * fix: textarea size --- .../__snapshots__/demo-extend.test.ts.snap | 109 +++--- .../__tests__/__snapshots__/demo.test.ts.snap | 109 +++--- components/input/ClearableLabeledInput.tsx | 137 ------- components/input/Input.tsx | 133 ++----- components/input/TextArea.tsx | 277 ++++---------- .../__snapshots__/demo-extend.test.ts.snap | 193 ++++++---- .../__tests__/__snapshots__/demo.test.ts.snap | 201 ++++++---- .../__snapshots__/textarea.test.tsx.snap | 344 +++++++++++------- components/input/__tests__/textarea.test.tsx | 5 + components/input/style/index.ts | 95 ++--- components/input/utils.ts | 3 +- components/mentions/index.tsx | 26 +- components/typography/Base/index.tsx | 2 +- components/typography/Editable.tsx | 2 +- package.json | 6 +- 15 files changed, 758 insertions(+), 884 deletions(-) delete mode 100644 components/input/ClearableLabeledInput.tsx diff --git a/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap index 692b203d60..dbd28e4df5 100644 --- a/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -8999,7 +8999,7 @@ exports[`renders ./components/form/demo/register.tsx extend context correctly 1` class="ant-form-item-control-input-content" >
, , - + + + + `; exports[`TextArea allowClear should change type when click 2`] = `