You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5052b6d
Browse filesBrowse the repository at this point in the historyBrowse files
docs(Toast): the card's props say useToast()'s show function sets them, without restating values
The values stay where component:Toast's record puts them: useToast's doc
describes the show function's defaults. Toast.doc.mjs no longer repeats
them in prose, which read as a new default clause.
Copy file name to clipboardExpand all lines: packages/core/src/Toast/Toast.doc.mjs
+9-10Lines changed: 9 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -42,21 +42,21 @@ export const docs = {
42
42
name: 'type',
43
43
type: "'info' | 'error'",
44
44
description:
45
-
"Toast type controlling background color. useToast()'s show function sets 'info' when it is not given.",
45
+
"Toast type controlling background color. useToast()'s show function sets it when it is not given.",
46
46
default: "'info'",
47
47
},
48
48
{
49
49
name: 'isAutoHide',
50
50
type: 'boolean',
51
51
description:
52
-
"Whether the toast auto-dismisses. useToast()'s show function sets true for info and false for error when it is not given, so an error toast it shows persists until dismissed.",
52
+
"Whether the toast auto-dismisses. useToast()'s show function sets it by type when it is not given.",
53
53
required: true,
54
54
},
55
55
{
56
56
name: 'autoHideDuration',
57
57
type: 'number',
58
58
description:
59
-
"Duration in ms before auto-dismiss. Timed content must satisfy WCAG 2.2.1. useToast()'s show function sets 5000 when it is not given.",
59
+
"Duration in ms before auto-dismiss. Timed content must satisfy WCAG 2.2.1. useToast()'s show function sets it when it is not given.",
60
60
required: true,
61
61
},
62
62
{
@@ -202,11 +202,11 @@ export const docs = {
202
202
exportconstdocsZh={
203
203
propDescriptions: {
204
204
body: '主要消息内容。',
205
-
type: 'Toast 类型,控制背景颜色。未传入时,useToast() 的 show 函数设为 info。',
205
+
type: 'Toast 类型,控制背景颜色。未传入时,由 useToast() 的 show 函数设置。',
206
206
isAutoHide:
207
-
'是否自动关闭。未传入时,useToast() 的 show 函数对 info 设为 true、对 error 设为 false,因此它显示的 error toast 会持续显示直到关闭。',
207
+
'是否自动关闭。未传入时,由 useToast() 的 show 函数按类型设置。',
208
208
autoHideDuration:
209
-
'自动关闭前的持续时间(毫秒)。定时内容必须符合 WCAG 2.2.1。未传入时,useToast() 的 show 函数设为 5000。',
209
+
'自动关闭前的持续时间(毫秒)。定时内容必须符合 WCAG 2.2.1。未传入时,由 useToast() 的 show 函数设置。',
0 commit comments