semantic markup update
This commit is contained in:
@@ -12,6 +12,8 @@ export const toasts = writable([]);
|
||||
|
||||
// [DEF:addToast:Function]
|
||||
// @PURPOSE: Adds a new toast message.
|
||||
// @PRE: message string is provided.
|
||||
// @POST: New toast is added to the store and scheduled for removal.
|
||||
// @PARAM: message (string) - The message text.
|
||||
// @PARAM: type (string) - The type of toast (info, success, error).
|
||||
// @PARAM: duration (number) - Duration in ms before the toast is removed.
|
||||
@@ -25,6 +27,8 @@ export function addToast(message, type = 'info', duration = 3000) {
|
||||
|
||||
// [DEF:removeToast:Function]
|
||||
// @PURPOSE: Removes a toast message by ID.
|
||||
// @PRE: id is provided.
|
||||
// @POST: Toast is removed from the store.
|
||||
// @PARAM: id (string) - The ID of the toast to remove.
|
||||
function removeToast(id) {
|
||||
console.log(`[toasts.removeToast][Action] Removing toast context={{'id': '${id}'}}`);
|
||||
|
||||
Reference in New Issue
Block a user