From 820abee5f788c885c1e992ca38c9786ed183d389 Mon Sep 17 00:00:00 2001 From: Jiehui Date: Thu, 6 Apr 2023 17:28:21 +0800 Subject: [PATCH] docs(Notification): completing descriptions of missing props (#41671) * docs(Notification): completing descriptions of missing props. * Update components/notification/index.zh-CN.md Co-authored-by: afc163 --------- Co-authored-by: afc163 --- components/notification/index.en-US.md | 2 +- components/notification/index.zh-CN.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/notification/index.en-US.md b/components/notification/index.en-US.md index 9d3472c5e91f..c88c7a6de0ea 100644 --- a/components/notification/index.en-US.md +++ b/components/notification/index.en-US.md @@ -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. diff --git a/components/notification/index.zh-CN.md b/components/notification/index.zh-CN.md index e47bc1361a40..eb9705138f23 100644 --- a/components/notification/index.zh-CN.md +++ b/components/notification/index.zh-CN.md @@ -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 | - | ### 全局配置