Skip to content

Commit 5492554

Browse files
authored
Enhance toast function parameters with defaults
Added default values for duration, bgColor, and color parameters in the toast function.
1 parent 096f13d commit 5492554

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/toast/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ const toastQueue = [];
66
/**
77
* Show a toast message
88
* @param {string|HTMLElement} message
9-
* @param {number|false} duration
9+
* @param {number|false} [duration=0]
10+
* @param {string} [bgColor]
11+
* @param {string} [color]
1012
*/
1113
export default function toast(message, duration = 0, bgColor, color) {
1214
const $oldToast = tag.get("#toast");

0 commit comments

Comments
 (0)