From 77c5adbe4deba3427b1b7f0cf8f91c58be4fca25 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: Sat, 30 May 2020 18:28:25 +0800 Subject: [PATCH] feat: New Tabs (#24552) * init style * support size * editable * add shadow * update demo * fix nest style * update rtl * update snapshot * bump * fix hover * fix test case * fix style lint * clean up * updat docs * add onTabScroll * upgrade rc-dropdown * update snapshot * clean snapshot * clean up Co-authored-by: afc163 --- .../__tests__/__snapshots__/demo.test.js.snap | 415 +- .../__snapshots__/components.test.js.snap | 906 ++- .../__tests__/__snapshots__/demo.test.js.snap | 184 +- components/style/themes/default.less | 1 + components/tabs/TabBar.tsx | 91 - .../__tests__/__snapshots__/demo.test.js.snap | 5358 ++++++++--------- .../__snapshots__/index.test.js.snap | 319 +- components/tabs/__tests__/index.test.js | 14 +- components/tabs/demo/basic.md | 7 +- components/tabs/demo/card-top.md | 38 +- components/tabs/demo/slide.md | 2 +- components/tabs/index.en-US.md | 37 +- components/tabs/index.tsx | 240 +- components/tabs/index.zh-CN.md | 37 +- components/tabs/style/card-style.less | 181 - components/tabs/style/card.less | 90 + components/tabs/style/dropdown.less | 59 + components/tabs/style/index.less | 497 +- components/tabs/style/position.less | 186 + components/tabs/style/rtl.less | 96 +- components/tabs/style/size.less | 41 + components/typography/Base.tsx | 10 +- package.json | 4 +- site/theme/static/template.html | 10 +- site/theme/template/Home/MorePage.tsx | 6 +- 25 files changed, 3795 insertions(+), 5034 deletions(-) delete mode 100644 components/tabs/TabBar.tsx delete mode 100644 components/tabs/style/card-style.less create mode 100644 components/tabs/style/card.less create mode 100644 components/tabs/style/dropdown.less create mode 100644 components/tabs/style/position.less create mode 100644 components/tabs/style/size.less diff --git a/components/card/__tests__/__snapshots__/demo.test.js.snap b/components/card/__tests__/__snapshots__/demo.test.js.snap index 076e34a278cd..54390765a11d 100644 --- a/components/card/__tests__/__snapshots__/demo.test.js.snap +++ b/components/card/__tests__/__snapshots__/demo.test.js.snap @@ -839,133 +839,99 @@ exports[`renders ./components/card/demo/tabs.md correctly 1`] = `
- - - - - - - - - +
+
+
+
+
+ + +
-
@@ -990,161 +956,124 @@ exports[`renders ./components/card/demo/tabs.md correctly 1`] = ` class="ant-card-head-wrapper" />
- - More - + + + +
+
- - - - - - - - -
+
+