diff --git a/components/button/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/button/__tests__/__snapshots__/demo-extend.test.ts.snap
index ba74f2f586..d1c0a066c4 100644
--- a/components/button/__tests__/__snapshots__/demo-extend.test.ts.snap
+++ b/components/button/__tests__/__snapshots__/demo-extend.test.ts.snap
@@ -2,69 +2,48 @@
exports[`renders components/button/demo/basic.tsx extend context correctly 1`] = `
-
-
-
-
+ Primary Button
+
+
+
-
+ Default Button
+
+
+
-
-
- Dashed Button
-
-
-
-
+ Dashed Button
+
+
+
-
-
- Text Button
-
-
-
-
+ Text Button
+
+
+
-
-
- Link Button
-
-
-
+
+ Link Button
+
+
`;
@@ -72,82 +51,58 @@ exports[`renders components/button/demo/basic.tsx extend context correctly 2`] =
exports[`renders components/button/demo/block.tsx extend context correctly 1`] = `
-
-
-
- Primary
-
-
-
-
+ Primary
+
+
+
-
-
- Default
-
-
-
-
+ Default
+
+
+
-
-
- Dashed
-
-
-
-
+ Dashed
+
+
+
-
-
- disabled
-
-
-
-
+ disabled
+
+
+
-
-
- text
-
-
-
-
+ text
+
+
+
-
-
- Link
-
-
-
+
+ Link
+
+
`;
@@ -155,232 +110,203 @@ exports[`renders components/button/demo/block.tsx extend context correctly 2`] =
exports[`renders components/button/demo/chinese-chars-loading.tsx extend context correctly 1`] = `
-
-
-
-
- 部署
-
-
-
-
-
-
-
-
-
-
-
-
- 部 署
-
-
-
-
-
-
+
+
-
-
-
-
+
+
- Submit
-
-
-
+
+ 部 署
+
+
+
-
-
-
-
+
+
+
+ 部署
+
+
+
+
+
+
+
+
部署
-
-
-
+
+
-
-
-
-
+
+
-
- 按 钮
+
+ Submit
+
+
+
+
+
-
-
+
+ 部署
+
+
+
+
+
+
+
+
+ 按 钮
+
+
`;
@@ -388,100 +314,66 @@ exports[`renders components/button/demo/chinese-chars-loading.tsx extend context
exports[`renders components/button/demo/component-token.tsx extend context correctly 1`] = `
-
-
-
-
- TEXT
-
-
-
-
-
-
- CONTAINED
-
-
-
-
-
-
- OUTLINED
-
-
-
-
+
+ TEXT
+
+
+
+
+ CONTAINED
+
+
+
+
+ OUTLINED
+
+
-
-
-
-
- TEXT
-
-
-
-
-
-
- CONTAINED
-
-
-
-
-
-
- OUTLINED
-
-
-
-
+
+ TEXT
+
+
+
+
+ CONTAINED
+
+
+
+
+ OUTLINED
+
+
`;
@@ -490,69 +382,48 @@ exports[`renders components/button/demo/component-token.tsx extend context corre
exports[`renders components/button/demo/danger.tsx extend context correctly 1`] = `
-
-
-
- Primary
-
-
-
-
+ Primary
+
+
+
-
-
- Default
-
-
-
-
+ Default
+
+
+
-
-
- Dashed
-
-
-
-
+ Dashed
+
+
+
-
-
- Text
-
-
-
-
+ Text
+
+
+
-
-
- Link
-
-
-
+
+ Link
+
+
`;
@@ -695,444 +566,390 @@ Array [
,
+
+
+
+
+
+
+
+
-
-
-
- A
-
-
-
-
-
-
-
-
-
-
-
- Search
-
-
-
-
-
-
-
-
-
-
-
-
- Search
-
-
-
+
+
+ A
+
+
+
+
+
+
+
+
+
+ Search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Search
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- Search
-
-
-
-
-
-
-
-
-
-
-
-
- Search
-
-
-
-
-
-
-
-
-
-
- Search
-
-
-
+
+
+
+
+
+
+
+ Search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Search
+
+
,
]
@@ -1142,336 +959,216 @@ exports[`renders components/button/demo/debug-icon.tsx extend context correctly
exports[`renders components/button/demo/disabled.tsx extend context correctly 1`] = `
-
-
-
-
- Primary
-
-
-
-
-
-
- Primary(disabled)
-
-
-
-
+
+ Primary
+
+
+
+
+ Primary(disabled)
+
+
-
-
-
-
- Default
-
-
-
-
-
-
- Default(disabled)
-
-
-
-
+
+ Default
+
+
+
+
+ Default(disabled)
+
+
-
-
-
-
- Dashed
-
-
-
-
-
-
- Dashed(disabled)
-
-
-
-
+
+ Dashed
+
+
+
+
+ Dashed(disabled)
+
+
-
-
-
-
- Text
-
-
-
-
-
-
- Text(disabled)
-
-
-
-
+
+ Text
+
+
+
+
+ Text(disabled)
+
+
-
-
-
-
- Link
-
-
-
-
-
-
- Link(disabled)
-
-
-
-
+
+ Link
+
+
+
+
+ Link(disabled)
+
+
-
-
-
-
- Danger Default
-
-
-
-
-
-
- Danger Default(disabled)
-
-
-
-
+
+ Danger Default
+
+
+
+
+ Danger Default(disabled)
+
+
-
-
-
-
- Danger Text
-
-
-
-
-
-
- Danger Text(disabled)
-
-
-
-
+
+ Danger Text
+
+
+
+
+ Danger Text(disabled)
+
+
-
-
-
-
- Danger Link
-
-
-
-
-
-
- Danger Link(disabled)
-
-
-
-
+
+ Danger Link
+
+
+
+
+ Danger Link(disabled)
+
+
-
+
+ Ghost
+
+
+
+
+ Ghost(disabled)
+
+
`;
@@ -1480,57 +1177,40 @@ exports[`renders components/button/demo/disabled.tsx extend context correctly 2`
exports[`renders components/button/demo/ghost.tsx extend context correctly 1`] = `
`;
@@ -1538,413 +1218,363 @@ exports[`renders components/button/demo/ghost.tsx extend context correctly 2`] =
exports[`renders components/button/demo/icon.tsx extend context correctly 1`] = `
+
+
+
+
+
+
+
+
-
-
-
- A
-
-
-
-
-
-
-
-
-
-
-
- Search
-
-
-
-
-
-
-
-
-
-
-
-
- Search
-
-
-
+
+
+ A
+
+
+
+
+
+
+
+
+
+ Search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Search
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- Search
-
-
-
-
-
-
-
-
-
-
-
-
- Search
-
-
-
-
+
+
+
+
+
+
+
+ Search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Search
+
+
+
+
+
+
+
+
+
`;
@@ -2307,208 +1937,174 @@ exports[`renders components/button/demo/legacy-group.tsx extend context correctl
exports[`renders components/button/demo/loading.tsx extend context correctly 1`] = `
-
-
-
-
-
-
-
-
-
- Loading
-
-
-
-
+
+
+
+
+ Loading
+
+
+
+
-
-
-
-
-
-
-
- Loading
-
-
-
-
+
+
+
+
+ Loading
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+ Click me!
+
+
+
+
-
-
- Click me!
-
-
-
-
-
-
-
-
-
-
-
- Click me!
-
-
-
-
+
+
+
+
+ Click me!
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
`;
@@ -2517,226 +2113,214 @@ exports[`renders components/button/demo/loading.tsx extend context correctly 2`]
exports[`renders components/button/demo/multiple.tsx extend context correctly 1`] = `
+
+
+ primary
+
+
+
+
+ secondary
+
+
- primary
+ Actions
-
-
-
- secondary
-
-
-
-
,
]
diff --git a/components/button/__tests__/__snapshots__/demo.test.ts.snap b/components/button/__tests__/__snapshots__/demo.test.ts.snap
index 468663d464..c2506f7054 100644
--- a/components/button/__tests__/__snapshots__/demo.test.ts.snap
+++ b/components/button/__tests__/__snapshots__/demo.test.ts.snap
@@ -2,544 +2,415 @@
exports[`renders components/button/demo/basic.tsx correctly 1`] = `
+
+
+ Primary Button
+
+
+
+
+ Default Button
+
+
+
+
+ Dashed Button
+
+
+
+
+ Text Button
+
+
+
+
+ Link Button
+
+
+
+`;
+
+exports[`renders components/button/demo/block.tsx correctly 1`] = `
+
+
+
+ Primary
+
+
+
+
+ Default
+
+
+
+
+ Dashed
+
+
+
+
+ disabled
+
+
+
+
+ text
+
+
+
+
+ Link
+
+
+
+`;
+
+exports[`renders components/button/demo/chinese-chars-loading.tsx correctly 1`] = `
+
+
+
+
+ 部署
+
+
+
+
+
+
+
+
+
+
+ 部 署
+
+
+
+
+
+
+
+
+ 部署
+
+
+
+
+
+
+
+
+ 部署
+
+
+
+
+
+
+
+
+ Submit
+
+
+
+
+
+
+
+ 部署
+
+
+
+
+
+
+
+
+ 按 钮
+
+
+
+`;
+
+exports[`renders components/button/demo/component-token.tsx correctly 1`] = `
+
-
-
- Primary Button
-
-
-
-
-
-
- Default Button
-
-
-
-
-
-
- Dashed Button
-
-
-
-
- Text Button
+ TEXT
-
-
- Link Button
+ CONTAINED
-
-
-`;
-
-exports[`renders components/button/demo/block.tsx correctly 1`] = `
-
-
-
-
- Primary
-
-
-
-
-
-
- Default
-
-
-
-
-
-
- Dashed
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
- text
-
-
-
-
-
-
- Link
-
-
-
-
-`;
-
-exports[`renders components/button/demo/chinese-chars-loading.tsx correctly 1`] = `
-
-
-
- 部署
-
+ OUTLINED
-
-
-
-
-
- 部 署
+ TEXT
-
-
-
-
-
-
-
-
-
- 部署
+ CONTAINED
-
-
-
-
-
-
-
- Submit
-
-
-
-
-
-
-
-
-
-
- 按 钮
+ OUTLINED
`;
-exports[`renders components/button/demo/component-token.tsx correctly 1`] = `
-
-
-
-
-
-
- TEXT
-
-
-
-
-
-
- CONTAINED
-
-
-
-
-
-
- OUTLINED
-
-
-
-
-
-
-
-
-
-
- TEXT
-
-
-
-
-
-
- CONTAINED
-
-
-
-
-
-
- OUTLINED
-
-
-
-
-
-
-`;
-
exports[`renders components/button/demo/danger.tsx correctly 1`] = `
-
-
-
- Primary
-
-
-
-
+ Primary
+
+
+
-
-
- Default
-
-
-
-
+ Default
+
+
+
-
-
- Dashed
-
-
-
-
+ Dashed
+
+
+
-
-
- Text
-
-
-
-
+ Text
+
+
+
-
-
- Link
-
-
-
+
+ Link
+
+
`;
@@ -678,368 +549,314 @@ Array [
,
-
-
-
+
+
+
+
+
+
+ A
+
+
+
+
-
-
- A
-
-
-
-
-
-
-
-
-
-
-
- Search
-
-
-
-
+
+
+
+
+ Search
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
- Search
-
-
-
-
+
+
+
+
+
+ Search
+
+
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
- Search
-
-
-
-
+
+
+
+
+ Search
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
- Search
-
-
-
-
+
+
+
+
+ Search
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
- Search
-
-
-
-
+
+
+
+
+ Search
+
+
,
]
@@ -1047,729 +864,542 @@ Array [
exports[`renders components/button/demo/disabled.tsx correctly 1`] = `
-
-
-
-
- Primary
-
-
-
-
-
-
- Primary(disabled)
-
-
-
-
-
-
-
-
-
-
- Default
-
-
-
-
-
-
- Default(disabled)
-
-
-
-
-
-
-
-
-
-
- Dashed
-
-
-
-
-
-
- Dashed(disabled)
-
-
-
-
-
-
-
-
-
-
- Text
-
-
-
-
-
-
- Text(disabled)
-
-
-
-
-
-
-
-
-
-
- Link
-
-
-
-
-
-
- Link(disabled)
-
-
-
-
-
-
-
-
-
-
-
- Danger Default
-
-
-
-
-
-
- Danger Default(disabled)
-
-
-
-
-
-
-
-
-
-
- Danger Text
-
-
-
-
-
-
- Danger Text(disabled)
-
-
-
-
-
-
-
-
-
-
- Danger Link
-
-
-
-
-
-
- Danger Link(disabled)
-
-
-
-
-
-
-
-`;
-
-exports[`renders components/button/demo/ghost.tsx correctly 1`] = `
-
`;
+exports[`renders components/button/demo/ghost.tsx correctly 1`] = `
+
+
+
+ Primary
+
+
+
+
+ Default
+
+
+
+
+ Dashed
+
+
+
+
+ Danger
+
+
+
+`;
+
exports[`renders components/button/demo/icon.tsx correctly 1`] = `
-
-
-
+
+
+
+
+
+
+ A
+
+
+
+
-
-
- A
-
-
-
-
-
-
-
-
-
-
-
- Search
-
-
-
-
+
+
+
+
+ Search
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
- Search
-
-
-
-
+
+
+
+
+
+ Search
+
+
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
- Search
-
-
-
-
+
+
+
+
+ Search
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
- Search
-
-
-
-
+
+
+
+
+ Search
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
`;
@@ -2014,281 +1644,235 @@ Array [
exports[`renders components/button/demo/loading.tsx correctly 1`] = `
-
-
-
-
-
-
-
-
-
- Loading
-
-
-
-
+
+
+
+
+ Loading
+
+
+
+
-
-
-
-
-
-
-
- Loading
-
-
-
-
+
+
+
+
+ Loading
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
- Click me!
-
-
-
-
-
-
-
-
-
-
-
- Click me!
-
-
-
-
-
-
-
-`;
-
-exports[`renders components/button/demo/multiple.tsx correctly 1`] = `
-
-
- primary
+ Click me!
+
+
+
+
+
+
+
+
+
+ Click me!
+
+
+
+
+
+
+
+
+`;
+
+exports[`renders components/button/demo/multiple.tsx correctly 1`] = `
+
+
+
+ primary
+
+
+
+
+ secondary
+
+
- secondary
+ Actions
-
-
`;
@@ -2368,239 +1952,193 @@ Array [
,
-
-
-
-
- Primary
-
-
-
-
-
-
- Default
-
-
-
-
-
-
- Dashed
-
-
-
-
-
-
- Link
+ Primary
+
+
+
+
+ Default
+
+
+
+
+ Dashed
-
-
+ Link
+
+
+
+
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
- Download
-
-
-
-
+
+
+
+
+ Download
+
+
+
+
-
-
-
-
-
-
-
- Download
-
-
-
-
+
+
+
+
+
+ Download
+
+
,
]
diff --git a/components/button/demo/basic.tsx b/components/button/demo/basic.tsx
index da2b2fc5bd..0cda77ee32 100644
--- a/components/button/demo/basic.tsx
+++ b/components/button/demo/basic.tsx
@@ -1,14 +1,14 @@
import React from 'react';
-import { Button, Space } from 'antd';
+import { Button, Flex } from 'antd';
const App: React.FC = () => (
-
+
Primary Button
Default Button
Dashed Button
Text Button
Link Button
-
+
);
export default App;
diff --git a/components/button/demo/block.tsx b/components/button/demo/block.tsx
index 4a9ed7ee3d..7691882595 100644
--- a/components/button/demo/block.tsx
+++ b/components/button/demo/block.tsx
@@ -1,8 +1,8 @@
import React from 'react';
-import { Button, Space } from 'antd';
+import { Button, Flex } from 'antd';
const App: React.FC = () => (
-
+
Primary
@@ -19,7 +19,7 @@ const App: React.FC = () => (
Link
-
+
);
export default App;
diff --git a/components/button/demo/chinese-chars-loading.tsx b/components/button/demo/chinese-chars-loading.tsx
index 791772f010..de7675cdc1 100644
--- a/components/button/demo/chinese-chars-loading.tsx
+++ b/components/button/demo/chinese-chars-loading.tsx
@@ -1,14 +1,13 @@
-// @ts-nocheck
-import { PoweroffOutlined } from '@ant-design/icons';
import React from 'react';
-import { Button, Space } from 'antd';
+import { PoweroffOutlined } from '@ant-design/icons';
+import { Button, Flex } from 'antd';
const Text1 = () => '部署';
const Text2 = () => 部署;
const Text3 = () => 'Submit';
const App: React.FC = () => (
-
+
部署
@@ -28,7 +27,7 @@ const App: React.FC = () => (
按钮
-
+
);
export default App;
diff --git a/components/button/demo/component-token.tsx b/components/button/demo/component-token.tsx
index 9fec6db5b3..51bd10bae9 100644
--- a/components/button/demo/component-token.tsx
+++ b/components/button/demo/component-token.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { Button, ConfigProvider, Space } from 'antd';
+import { Button, ConfigProvider, Flex } from 'antd';
const App: React.FC = () => (
(
colorPrimary: '#1976d2',
controlHeight: 36,
primaryShadow:
- '0px 3px 1px -2px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12)',
+ '0 3px 1px -2px rgba(0,0,0,0.2), 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12)',
fontWeight: 500,
defaultBorderColor: 'rgba(25, 118, 210, 0.5)',
colorText: '#1976d2',
@@ -22,13 +22,13 @@ const App: React.FC = () => (
},
}}
>
-
-
+
+
TEXT
CONTAINED
OUTLINED
-
-
+
+
TEXT
@@ -36,8 +36,8 @@ const App: React.FC = () => (
CONTAINED
OUTLINED
-
-
+
+
);
diff --git a/components/button/demo/danger.tsx b/components/button/demo/danger.tsx
index c00046a9b7..d205355e2a 100644
--- a/components/button/demo/danger.tsx
+++ b/components/button/demo/danger.tsx
@@ -1,8 +1,8 @@
import React from 'react';
-import { Button, Space } from 'antd';
+import { Button, Flex } from 'antd';
const App: React.FC = () => (
-
+
Primary
@@ -16,7 +16,7 @@ const App: React.FC = () => (
Link
-
+
);
export default App;
diff --git a/components/button/demo/debug-icon.tsx b/components/button/demo/debug-icon.tsx
index e7ba6d1f93..d8af351388 100644
--- a/components/button/demo/debug-icon.tsx
+++ b/components/button/demo/debug-icon.tsx
@@ -1,11 +1,10 @@
+import React from 'react';
import { SearchOutlined } from '@ant-design/icons';
-import React, { useState } from 'react';
-import { Button, ConfigProvider, Divider, Radio, Space, Tooltip } from 'antd';
+import { Button, ConfigProvider, Divider, Flex, Radio, Tooltip } from 'antd';
import type { SizeType } from 'antd/es/config-provider/SizeContext';
const App: React.FC = () => {
- const [size, setSize] = useState('large');
-
+ const [size, setSize] = React.useState('large');
return (
<>
setSize(e.target.value)}>
@@ -17,8 +16,8 @@ const App: React.FC = () => {
Preview
-
-
+
+
} />
@@ -32,8 +31,8 @@ const App: React.FC = () => {
} />
}>Search
-
-
+
+
} />
@@ -49,8 +48,8 @@ const App: React.FC = () => {
Search
-
-
+
+
>
);
diff --git a/components/button/demo/disabled.tsx b/components/button/demo/disabled.tsx
index c334f2e5c4..5f1a5a5842 100644
--- a/components/button/demo/disabled.tsx
+++ b/components/button/demo/disabled.tsx
@@ -1,73 +1,73 @@
import React from 'react';
-import { Button, Space } from 'antd';
+import { Button, Flex } from 'antd';
const App: React.FC = () => (
-
-
+
+
Primary
Primary(disabled)
-
-
+
+
Default
Default(disabled)
-
-
+
+
Dashed
Dashed(disabled)
-
-
+
+
Text
Text(disabled)
-
-
+
+
Link
Link(disabled)
-
-
-
+
+
+
Href Primary
-
+
Href Primary(disabled)
-
-
+
+
Danger Default
Danger Default(disabled)
-
-
+
+
Danger Text
Danger Text(disabled)
-
-
+
+
Danger Link
Danger Link(disabled)
-
-
+
+
Ghost
Ghost(disabled)
-
-
+
+
);
export default App;
diff --git a/components/button/demo/ghost.tsx b/components/button/demo/ghost.tsx
index e6872a30f2..fe0da63cc4 100644
--- a/components/button/demo/ghost.tsx
+++ b/components/button/demo/ghost.tsx
@@ -1,8 +1,8 @@
import React from 'react';
-import { Button, Space } from 'antd';
+import { Button, Flex } from 'antd';
const App: React.FC = () => (
-
+
Primary
@@ -13,7 +13,7 @@ const App: React.FC = () => (
Danger
-
+
);
export default App;
diff --git a/components/button/demo/icon.tsx b/components/button/demo/icon.tsx
index eb687883ef..855e8d6393 100644
--- a/components/button/demo/icon.tsx
+++ b/components/button/demo/icon.tsx
@@ -1,10 +1,10 @@
import React from 'react';
import { SearchOutlined } from '@ant-design/icons';
-import { Button, Tooltip, Space } from 'antd';
+import { Button, Flex, Tooltip } from 'antd';
const App: React.FC = () => (
-
-
+
+
} />
@@ -18,8 +18,8 @@ const App: React.FC = () => (
} />
}>Search
-
-
+
+
} />
@@ -31,8 +31,8 @@ const App: React.FC = () => (
Search
} href="https://www.google.com" />
-
-
+
+
);
export default App;
diff --git a/components/button/demo/loading.tsx b/components/button/demo/loading.tsx
index 2efb35d6a0..0562c4516e 100644
--- a/components/button/demo/loading.tsx
+++ b/components/button/demo/loading.tsx
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import { PoweroffOutlined } from '@ant-design/icons';
-import { Button, Space } from 'antd';
+import { Button, Flex } from 'antd';
const App: React.FC = () => {
const [loadings, setLoadings] = useState([]);
@@ -22,8 +22,8 @@ const App: React.FC = () => {
};
return (
-
-
+
+
Loading
@@ -31,9 +31,8 @@ const App: React.FC = () => {
Loading
} loading />
-
-
-
+
+
enterLoading(0)}>
Click me!
@@ -51,8 +50,8 @@ const App: React.FC = () => {
loading={loadings[2]}
onClick={() => enterLoading(2)}
/>
-
-
+
+
);
};
diff --git a/components/button/demo/multiple.tsx b/components/button/demo/multiple.tsx
index f1e0cad130..aef4eeeb4e 100644
--- a/components/button/demo/multiple.tsx
+++ b/components/button/demo/multiple.tsx
@@ -1,6 +1,6 @@
import React from 'react';
import type { MenuProps } from 'antd';
-import { Button, Dropdown, Space } from 'antd';
+import { Button, Dropdown, Flex } from 'antd';
const onMenuClick: MenuProps['onClick'] = (e) => {
console.log('click', e);
@@ -22,11 +22,11 @@ const items = [
];
const App: React.FC = () => (
-
+
primary
secondary
Actions
-
+
);
export default App;
diff --git a/components/button/demo/size.tsx b/components/button/demo/size.tsx
index db4fed605e..ebbbb87396 100644
--- a/components/button/demo/size.tsx
+++ b/components/button/demo/size.tsx
@@ -1,11 +1,10 @@
import React, { useState } from 'react';
import { DownloadOutlined } from '@ant-design/icons';
-import { Button, Radio, Space, Divider } from 'antd';
+import { Button, Divider, Flex, Radio } from 'antd';
import type { SizeType } from 'antd/es/config-provider/SizeContext';
const App: React.FC = () => {
const [size, setSize] = useState('large'); // default is 'middle'
-
return (
<>
setSize(e.target.value)}>
@@ -16,8 +15,8 @@ const App: React.FC = () => {
Preview
-
-
+
+
Primary
@@ -25,11 +24,11 @@ const App: React.FC = () => {
Dashed
-
+
Link
-
+
} size={size} />
} size={size} />
} size={size} />
@@ -39,8 +38,8 @@ const App: React.FC = () => {
} size={size}>
Download
-
-
+
+
>
);
};