Skip to content

Commit

Permalink
docs(Notification): completing descriptions of missing props (ant-des…
Browse files Browse the repository at this point in the history
…ign#41671)

* docs(Notification): completing descriptions of missing props.

* Update components/notification/index.zh-CN.md

Co-authored-by: afc163 <afc163@gmail.com>

---------

Co-authored-by: afc163 <afc163@gmail.com>
  • Loading branch information
luckyJeffy and afc163 authored Apr 6, 2023
1 parent 326d7a1 commit 820abee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/notification/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The properties of config are as follows:
| top | Distance from the top of the viewport, when `placement` is `topRight` or `topLeft` (unit: pixels) | number | 24 |
| onClick | Specify a function that will be called when the notification is clicked | function | - |
| onClose | Trigger when notification closed | function | - |
| props | Props passed down | Object | An object that can contain `data-*`, `aria-*`, or `role` props, to be put on the notification `div`. This currently only allows `data-testid` instead of `data-*` in TypeScript. See https://github.com/microsoft/TypeScript/issues/28960. |
| props | An object that can contain `data-*`, `aria-*`, or `role` props, to be put on the notification `div`. This currently only allows `data-testid` instead of `data-*` in TypeScript. See https://github.com/microsoft/TypeScript/issues/28960. | Object | - |

`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.

Expand Down
1 change: 1 addition & 0 deletions components/notification/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ config 参数如下:
| top | 消息从顶部弹出时,距离顶部的位置,单位像素 | number | 24 |
| onClick | 点击通知时触发的回调函数 | function | - |
| onClose | 当通知关闭时触发 | function | - |
| props | 透传至通知 `div` 上的 props 对象,支持传入 `data-*` `aria-*``role` 作为对象的属性。需要注意的是,虽然在 TypeScript 类型中声明的类型支持传入 `data-*` 作为对象的属性,但目前只允许传入 `data-testid` 作为对象的属性。 详见 https://github.com/microsoft/TypeScript/issues/28960 | Object | - |

### 全局配置

Expand Down

0 comments on commit 820abee

Please sign in to comment.