diff --git a/components/notification/__tests__/__snapshots__/demo.test.js.snap b/components/notification/__tests__/__snapshots__/demo.test.js.snap index 0c458c133342..35169fe4f4d9 100644 --- a/components/notification/__tests__/__snapshots__/demo.test.js.snap +++ b/components/notification/__tests__/__snapshots__/demo.test.js.snap @@ -46,64 +46,116 @@ exports[`renders ./components/notification/demo/duration.md correctly 1`] = ` exports[`renders ./components/notification/demo/placement.md correctly 1`] = `
-
- -
+ + + + + topRight + + + diff --git a/components/notification/demo/placement.md b/components/notification/demo/placement.md index cd652cfb6d79..44df9428fefa 100755 --- a/components/notification/demo/placement.md +++ b/components/notification/demo/placement.md @@ -7,44 +7,42 @@ title: ## zh-CN -可以设置通知从右上角、右下角、左下角、左上角弹出。 +通知从右上角、右下角、左下角、左上角弹出。 ## en-US A notification box can appear from the `topRight`, `bottomRight`, `bottomLeft` or `topLeft` of the viewport. ```jsx -import { Button, Select, notification } from 'antd'; +import { Button, Icon, notification, Divider } from 'antd'; -const { Option } = Select; -const options = ['topLeft', 'topRight', 'bottomLeft', 'bottomRight']; -const openNotification = () => { - notification.open({ - message: 'Notification Title', +const openNotification = placement => { + notification.info({ + message: `Notification ${placement}`, description: 'This is the content of the notification. This is the content of the notification. This is the content of the notification.', + placement, }); }; ReactDOM.render(
- - + + + +
, mountNode,