Example

Examples of Toast Notification

const LOCATION_OF_TOASTS = 1;
const REMOVE_TIME_IN_MS = 8000;
const MESSAGE = "Test notification"; // The message to display in the toast.
const REDIRECT_TO_URL = "https://puffanee.com"; // When you click on the notification, you will be redirected to this address (only url). Default is no redirect, remove notification.
const SHOW_ICON = true; // Default is True

// Construct new toast class
const Toasts = new DialogioToast(LOCATION_OF_TOASTS, REMOVE_TIME_IN_MS);

// Push new Notification toast
Toasts.Notif(MESSAGE, REDIRECT_TO_URL, SHOW_ICON);

// Push new Success toast
Toasts.Success(MESSAGE, REDIRECT_TO_URL, SHOW_ICON);

Last updated