diff --git a/components/notification/demo/placement.md b/components/notification/demo/placement.md index bf0f174c81b5..346de1675d87 100755 --- a/components/notification/demo/placement.md +++ b/components/notification/demo/placement.md @@ -1,7 +1,7 @@ ## zh-CN -使用 `placement` 可以配置通知从右上角、右下角、左下角、左上角弹出。 +使用 `placement` 可以配置通知从上面、下面、左上角、右上角、左下角、右下角弹出。 ## en-US -A notification box can appear from the `topRight`, `bottomRight`, `bottomLeft` or `topLeft` of the viewport via `placement`. +A notification box can appear from the `top` `bottom` `topLeft` `topRight` `bottomLeft` or `bottomRight` of the viewport via `placement`. diff --git a/components/notification/index.en-US.md b/components/notification/index.en-US.md index e5fc56942ad6..a54cc8f3c705 100644 --- a/components/notification/index.en-US.md +++ b/components/notification/index.en-US.md @@ -57,7 +57,7 @@ The properties of config are as follows: | icon | Customized icon | ReactNode | - | - | | key | The unique identifier of the Notification | string | - | - | | message | The title of notification box (required) | ReactNode | - | - | -| placement | Position of Notification, can be one of `topLeft` `topRight` `bottomLeft` `bottomRight` | string | `topRight` | - | +| placement | Position of Notification, can be one of `top` `topLeft` `topRight` `bottom` `bottomLeft` `bottomRight` | string | `topRight` | - | | style | Customized inline style | [CSSProperties](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e434515761b36830c3e58a970abf5186f005adac/types/react/index.d.ts#L794) | - | - | | role | The semantics of notification content recognized by screen readers. The default value is `alert`. When set as the default value, the screen reader will promptly interrupt any ongoing content reading and prioritize the notification content for immediate attention. | `alert \| status` | `alert` | 5.6.0 | | onClick | Specify a function that will be called when the notification is clicked | function | - | - | @@ -70,13 +70,13 @@ The properties of config are as follows: | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | -| bottom | Distance from the bottom of the viewport, when `placement` is `bottomRight` or `bottomLeft` (unit: pixels) | number | 24 | | +| bottom | Distance from the bottom of the viewport, when `placement` is `bottom` `bottomRight` or `bottomLeft` (unit: pixels) | number | 24 | | | closeIcon | Custom close icon | boolean \| ReactNode | true | 5.7.0: close button will be hidden when setting to null or false | | getContainer | Return the mount node for Notification | () => HTMLNode | () => document.body | | -| placement | Position of Notification, can be one of `topLeft` `topRight` `bottomLeft` `bottomRight` | string | `topRight` | | +| placement | Position of Notification, can be one of `top` `topLeft` `topRight` `bottom` `bottomLeft` `bottomRight` | string | `topRight` | | | rtl | Whether to enable RTL mode | boolean | false | | | stack | Notifications will be stacked when amount is over threshold | boolean \| `{ threshold: number }` | `{ threshold: 3 }` | 5.10.0 | -| top | Distance from the top of the viewport, when `placement` is `topRight` or `topLeft` (unit: pixels) | number | 24 | | +| top | Distance from the top of the viewport, when `placement` is `top` `topRight` or `topLeft` (unit: pixels) | number | 24 | | | maxCount | Max Notification show, drop oldest if exceed limit | number | - | 4.17.0 | `notification` also provides a global `config()` method that can be used for specifying the default options. Once this method is used, all the notification boxes will take into account these globally defined options when displaying. @@ -102,13 +102,13 @@ notification.config({ | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | -| bottom | Distance from the bottom of the viewport, when `placement` is `bottomRight` or `bottomLeft` (unit: pixels) | number | 24 | | +| bottom | Distance from the bottom of the viewport, when `placement` is `bottom` `bottomRight` or `bottomLeft` (unit: pixels) | number | 24 | | | closeIcon | Custom close icon | boolean \| ReactNode | true | 5.7.0: close button will be hidden when setting to null or false | | duration | Time in seconds before Notification is closed. When set to 0 or null, it will never be closed automatically | number | 4.5 | | | getContainer | Return the mount node for Notification, but still display at fullScreen | () => HTMLNode | () => document.body | | -| placement | Position of Notification, can be one of `topLeft` `topRight` `bottomLeft` `bottomRight` | string | `topRight` | | +| placement | Position of Notification, can be one of `top` `topLeft` `topRight` `bottom` `bottomLeft` `bottomRight` | string | `topRight` | | | rtl | Whether to enable RTL mode | boolean | false | | -| top | Distance from the top of the viewport, when `placement` is `topRight` or `topLeft` (unit: pixels) | number | 24 | | +| top | Distance from the top of the viewport, when `placement` is `top` `topRight` or `topLeft` (unit: pixels) | number | 24 | | | maxCount | Max Notification show, drop oldest if exceed limit | number | - | 4.17.0 | ## Design Token diff --git a/components/notification/index.zh-CN.md b/components/notification/index.zh-CN.md index 61d9664de699..7ea7497fa43a 100644 --- a/components/notification/index.zh-CN.md +++ b/components/notification/index.zh-CN.md @@ -58,7 +58,7 @@ config 参数如下: | icon | 自定义图标 | ReactNode | - | - | | key | 当前通知唯一标志 | string | - | - | | message | 通知提醒标题,必选 | ReactNode | - | - | -| placement | 弹出位置,可选 `topLeft` `topRight` `bottomLeft` `bottomRight` | string | `topRight` | - | +| placement | 弹出位置,可选 `top` `topLeft` `topRight` `bottom` `bottomLeft` `bottomRight` | string | `topRight` | - | | style | 自定义内联样式 | [CSSProperties](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e434515761b36830c3e58a970abf5186f005adac/types/react/index.d.ts#L794) | - | - | | role | 供屏幕阅读器识别的通知内容语义,默认为 `alert`。此情况下屏幕阅读器会立即打断当前正在阅读的其他内容,转而阅读通知内容 | `alert \| status` | `alert` | 5.6.0 | | onClick | 点击通知时触发的回调函数 | function | - | - |