diff --git a/components/calendar/demo/card.tsx b/components/calendar/demo/card.tsx
index bf9b50af16..b6d89d0719 100644
--- a/components/calendar/demo/card.tsx
+++ b/components/calendar/demo/card.tsx
@@ -1,16 +1,16 @@
-import React from 'react';
-import type { Dayjs } from 'dayjs';
import { Calendar, theme } from 'antd';
import type { CalendarMode } from 'antd/es/calendar/generateCalendar';
+import type { Dayjs } from 'dayjs';
+import React from 'react';
+
+const onPanelChange = (value: Dayjs, mode: CalendarMode) => {
+ console.log(value.format('YYYY-MM-DD'), mode);
+};
const App: React.FC = () => {
const { token } = theme.useToken();
- const onPanelChange = (value: Dayjs, mode: CalendarMode) => {
- console.log(value.format('YYYY-MM-DD'), mode);
- };
-
- const wrapperStyle = {
+ const wrapperStyle: React.CSSProperties = {
width: 300,
border: `1px solid ${token.colorBorderSecondary}`,
borderRadius: token.borderRadiusLG,
diff --git a/components/card/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/card/__tests__/__snapshots__/demo-extend.test.ts.snap
index f88bc3b45d..46d98e27f1 100644
--- a/components/card/__tests__/__snapshots__/demo-extend.test.ts.snap
+++ b/components/card/__tests__/__snapshots__/demo-extend.test.ts.snap
@@ -1,124 +1,131 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/card/demo/basic.tsx extend context correctly 1`] = `
-Array [
+
- Default size card
-
-
+
+
+
+ Card content
+
+
+ Card content
+
+
+ Card content
+
+
-
-
- Card content
-
-
- Card content
-
-
- Card content
-
-
-
,
+
+
+
+ Card content
+
+
+ Card content
+
+
+ Card content
+
+
-
-
- Card content
-
-
- Card content
-
-
- Card content
-
-
- ,
-]
+
+
`;
exports[`renders ./components/card/demo/border-less.tsx extend context correctly 1`] = `
-
- Card title
-
+ Card title
-
-
- Card content
-
-
- Card content
-
-
- Card content
-
-
+
+
+
+ Card content
+
+
+ Card content
+
+
+ Card content
+
`;
@@ -229,92 +236,88 @@ exports[`renders ./components/card/demo/grid-card.tsx extend context correctly 1
exports[`renders ./components/card/demo/in-column.tsx extend context correctly 1`] = `
-
- Card title
-
+ Card title
-
- Card content
-
-
-
-
-
- Card content
-
+ Card content
+
+
-
- Card title
-
+ Card title
+
+
+ Card content
+
+
+
+
+
+
- Card content
+
+ Card title
+
+
+ Card content
+
diff --git a/components/card/__tests__/__snapshots__/demo.test.ts.snap b/components/card/__tests__/__snapshots__/demo.test.ts.snap
index d7602ec804..59137e86f0 100644
--- a/components/card/__tests__/__snapshots__/demo.test.ts.snap
+++ b/components/card/__tests__/__snapshots__/demo.test.ts.snap
@@ -1,124 +1,131 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/card/demo/basic.tsx correctly 1`] = `
-Array [
+
- Default size card
-
-
+
+
+
+ Card content
+
+
+ Card content
+
+
+ Card content
+
+
-
-
- Card content
-
-
- Card content
-
-
- Card content
-
-
-
,
+
+
+
+ Card content
+
+
+ Card content
+
+
+ Card content
+
+
-
-
- Card content
-
-
- Card content
-
-
- Card content
-
-
- ,
-]
+
+
`;
exports[`renders ./components/card/demo/border-less.tsx correctly 1`] = `
-
- Card title
-
+ Card title
-
-
- Card content
-
-
- Card content
-
-
- Card content
-
-
+
+
+
+ Card content
+
+
+ Card content
+
+
+ Card content
+
`;
@@ -229,92 +236,88 @@ exports[`renders ./components/card/demo/grid-card.tsx correctly 1`] = `
exports[`renders ./components/card/demo/in-column.tsx correctly 1`] = `
-
- Card title
-
+ Card title
-
- Card content
-
-
-
-
-
- Card content
-
+ Card content
+
+
-
- Card title
-
+ Card title
+
+
+ Card content
+
+
+
+
+
+
- Card content
+
+ Card title
+
+
+ Card content
+
diff --git a/components/card/demo/basic.tsx b/components/card/demo/basic.tsx
index 87a6b43c83..7475d4c054 100644
--- a/components/card/demo/basic.tsx
+++ b/components/card/demo/basic.tsx
@@ -1,8 +1,8 @@
+import { Card, Space } from 'antd';
import React from 'react';
-import { Card } from 'antd';
const App: React.FC = () => (
- <>
+
More} style={{ width: 300 }}>
Card content
Card content
@@ -13,7 +13,7 @@ const App: React.FC = () => (
Card content
Card content
- >
+
);
export default App;
diff --git a/components/card/demo/border-less.tsx b/components/card/demo/border-less.tsx
index f4d33fb8c2..6fc3bf87e6 100644
--- a/components/card/demo/border-less.tsx
+++ b/components/card/demo/border-less.tsx
@@ -1,14 +1,12 @@
-import React from 'react';
import { Card } from 'antd';
+import React from 'react';
const App: React.FC = () => (
-
-
- Card content
- Card content
- Card content
-
-
+
+ Card content
+ Card content
+ Card content
+
);
export default App;
diff --git a/components/card/demo/in-column.tsx b/components/card/demo/in-column.tsx
index 7e5ab63d76..b467466d9e 100644
--- a/components/card/demo/in-column.tsx
+++ b/components/card/demo/in-column.tsx
@@ -1,26 +1,24 @@
-import React from 'react';
import { Card, Col, Row } from 'antd';
+import React from 'react';
const App: React.FC = () => (
-
-
-
-
- Card content
-
-
-
-
- Card content
-
-
-
-
- Card content
-
-
-
-
+
+
+
+ Card content
+
+
+
+
+ Card content
+
+
+
+
+ Card content
+
+
+
);
export default App;
diff --git a/components/card/demo/tabs.tsx b/components/card/demo/tabs.tsx
index a2f23fee03..26d643fc6c 100644
--- a/components/card/demo/tabs.tsx
+++ b/components/card/demo/tabs.tsx
@@ -1,5 +1,5 @@
-import React, { useState } from 'react';
import { Card } from 'antd';
+import React, { useState } from 'react';
const tabList = [
{
@@ -57,9 +57,7 @@ const App: React.FC = () => {
extra={More}
tabList={tabList}
activeTabKey={activeTabKey1}
- onTabChange={(key) => {
- onTab1Change(key);
- }}
+ onTabChange={onTab1Change}
>
{contentList[activeTabKey1]}
@@ -70,9 +68,7 @@ const App: React.FC = () => {
tabList={tabListNoTitle}
activeTabKey={activeTabKey2}
tabBarExtraContent={More}
- onTabChange={(key) => {
- onTab2Change(key);
- }}
+ onTabChange={onTab2Change}
>
{contentListNoTitle[activeTabKey2]}