+ We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure), to help people create their product prototypes beautifully and efficiently.
+
+
diff --git a/components/comment/__tests__/index.test.js b/components/comment/__tests__/index.test.js
index 272d085d66..75e554c65b 100644
--- a/components/comment/__tests__/index.test.js
+++ b/components/comment/__tests__/index.test.js
@@ -1,3 +1,5 @@
+import React from 'react';
+import { mount } from 'enzyme';
import Comment from '../index';
import mountTest from '../../../tests/shared/mountTest';
import rtlTest from '../../../tests/shared/rtlTest';
@@ -5,4 +7,22 @@ import rtlTest from '../../../tests/shared/rtlTest';
describe('Comment', () => {
mountTest(Comment);
rtlTest(Comment);
+
+ it('should support empty actions', () => {
+ const wrapper = mount(
+ Han Solo}
+ content={
+
+ We supply a series of design principles, practical patterns and high quality design
+ resources (Sketch and Axure), to help people create their product prototypes beautifully
+ and efficiently.
+
-
-
+ ,
+]
`;
diff --git a/components/progress/__tests__/__snapshots__/index.test.js.snap b/components/progress/__tests__/__snapshots__/index.test.js.snap
index 127b9dca35..465ae612c5 100644
--- a/components/progress/__tests__/__snapshots__/index.test.js.snap
+++ b/components/progress/__tests__/__snapshots__/index.test.js.snap
@@ -550,3 +550,32 @@ exports[`Progress rtl render component should be rendered correctly in RTL direc
`;
+
+exports[`Progress should support steps 1`] = `
+
+
+
+
+
+
+ 0%
+
+
+
+`;
diff --git a/components/progress/__tests__/index.test.js b/components/progress/__tests__/index.test.js
index 454bb1b8dd..166228e94d 100644
--- a/components/progress/__tests__/index.test.js
+++ b/components/progress/__tests__/index.test.js
@@ -133,4 +133,9 @@ describe('Progress', () => {
expect(wrapper.find('.ant-progress-status-success')).toHaveLength(1);
errorSpy.mockRestore();
});
+
+ it('should support steps', () => {
+ const wrapper = mount();
+ expect(wrapper).toMatchRenderedSnapshot();
+ });
});
diff --git a/components/progress/demo/circle-dynamic.md b/components/progress/demo/circle-dynamic.md
index cb09ff4a23..6c4a2367d1 100644
--- a/components/progress/demo/circle-dynamic.md
+++ b/components/progress/demo/circle-dynamic.md
@@ -17,8 +17,6 @@ A dynamic progress bar is better.
import { Progress, Button } from 'antd';
import { MinusOutlined, PlusOutlined } from '@ant-design/icons';
-const ButtonGroup = Button.Group;
-
class App extends React.Component {
state = {
percent: 0,
@@ -42,13 +40,13 @@ class App extends React.Component {
render() {
return (
-
+ <>
-
+
} />
} />
-
-
+
+ >
);
}
}
diff --git a/components/progress/demo/circle-mini.md b/components/progress/demo/circle-mini.md
index c091ad3872..85a0dcd9d5 100644
--- a/components/progress/demo/circle-mini.md
+++ b/components/progress/demo/circle-mini.md
@@ -17,11 +17,11 @@ A smaller circular progress bar.
import { Progress } from 'antd';
ReactDOM.render(
-
+ <>
-
,
+ >,
mountNode,
);
```
diff --git a/components/progress/demo/circle.md b/components/progress/demo/circle.md
index ff25c97b99..f195bd2313 100644
--- a/components/progress/demo/circle.md
+++ b/components/progress/demo/circle.md
@@ -17,11 +17,11 @@ A circular progress bar.
import { Progress } from 'antd';
ReactDOM.render(
-
+ <>
-
,
+ >,
mountNode,
);
```
diff --git a/components/progress/demo/dashboard.md b/components/progress/demo/dashboard.md
index ba1738ae23..12578a05a8 100644
--- a/components/progress/demo/dashboard.md
+++ b/components/progress/demo/dashboard.md
@@ -17,9 +17,10 @@ By setting `type=dashboard`, you can get a dashboard style of progress easily. M
import { Progress } from 'antd';
ReactDOM.render(
-
+ <>
-
-, mountNode);
+ >,
+ mountNode,
+);
```
diff --git a/components/progress/demo/dynamic.md b/components/progress/demo/dynamic.md
index b45ec08cfc..6adcc953be 100644
--- a/components/progress/demo/dynamic.md
+++ b/components/progress/demo/dynamic.md
@@ -17,8 +17,6 @@ A dynamic progress bar is better.
import { Progress, Button } from 'antd';
import { MinusOutlined, PlusOutlined } from '@ant-design/icons';
-const ButtonGroup = Button.Group;
-
class App extends React.Component {
state = {
percent: 0,
@@ -42,13 +40,13 @@ class App extends React.Component {
render() {
return (
-
+ <>
-
+
} />
} />
-
-
+
+ >
);
}
}
diff --git a/components/progress/demo/format.md b/components/progress/demo/format.md
index fa25c0882f..bb9cde13b6 100644
--- a/components/progress/demo/format.md
+++ b/components/progress/demo/format.md
@@ -17,10 +17,10 @@ You can set a custom text by setting the `format` prop.
import { Progress } from 'antd';
ReactDOM.render(
-
+ <>
,
+ >,
mountNode,
);
```
diff --git a/components/progress/demo/gradient-line.md b/components/progress/demo/gradient-line.md
index 47dbcc4694..db0cc3472c 100644
--- a/components/progress/demo/gradient-line.md
+++ b/components/progress/demo/gradient-line.md
@@ -17,7 +17,7 @@ A package of `linear-gradient`. It is recommended to only pass two colors.
import { Progress } from 'antd';
const Demo = () => (
-
+ <>
(
}}
percent={100}
/>
-
+ >
);
ReactDOM.render(, mountNode);
diff --git a/components/progress/demo/line.md b/components/progress/demo/line.md
index f74471c9b0..e896f42f73 100644
--- a/components/progress/demo/line.md
+++ b/components/progress/demo/line.md
@@ -17,13 +17,13 @@ A standard progress bar.
import { Progress } from 'antd';
ReactDOM.render(
-
+ <>
-
,
+ >,
mountNode,
);
```
diff --git a/components/progress/demo/linecap.md b/components/progress/demo/linecap.md
index 7eb00a88a8..3b434ffc1f 100644
--- a/components/progress/demo/linecap.md
+++ b/components/progress/demo/linecap.md
@@ -17,11 +17,11 @@ By setting `strokeLinecap="square"`, you can change the linecaps from round to s
import { Progress } from 'antd';
ReactDOM.render(
-
+ <>
-
,
+ >,
mountNode,
);
```
diff --git a/components/progress/demo/segment.md b/components/progress/demo/segment.md
index d37e718664..9f9ab3b82e 100644
--- a/components/progress/demo/segment.md
+++ b/components/progress/demo/segment.md
@@ -17,7 +17,7 @@ A standard progress bar. Doesn't support trail color when `type="circle|dashboar
import { Tooltip, Progress } from 'antd';
ReactDOM.render(
-
+ <>
@@ -29,7 +29,7 @@ ReactDOM.render(
-
,
+ >,
mountNode,
);
```
diff --git a/components/progress/demo/steps.md b/components/progress/demo/steps.md
index 5c153b9dfa..2d49b42814 100644
--- a/components/progress/demo/steps.md
+++ b/components/progress/demo/steps.md
@@ -17,13 +17,13 @@ A progress bar with steps.
import { Progress } from 'antd';
ReactDOM.render(
-
+ We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure), to help people create their product prototypes beautifully and efficiently. +
++ We supply a series of design principles, practical patterns and high quality design + resources (Sketch and Axure), to help people create their product prototypes beautifully + and efficiently. +
+ } + datetime="YYYY-MM-DD HH:mm:ss" + />, + ); + expect(wrapper).toMatchRenderedSnapshot(); + }); }); diff --git a/components/comment/demo/basic.md b/components/comment/demo/basic.md index c15b9e49bb..1149eca55e 100644 --- a/components/comment/demo/basic.md +++ b/components/comment/demo/basic.md @@ -45,7 +45,7 @@ const Demo = () => { {likes} , - +{getAction(actions)}
++ {actions.map((action, index) => ( +- {action}
// eslint-disable-line react/no-array-index-key
+ ))}
+
) : null; - const authorContent = ( + const authorContent = (author || datetime) && (