Skip to main content
Version: 1.x

async

Uploading → Success Flow

const id = showToast({
message: "Uploading file...",
type: "loading",
duration: 0,
});

setTimeout(() => {
removeToast(id);
showToast({
message: "Upload complete",
type: "success",
});
}, 2000);

Updating → Success Flow

const id = showToast({
message: "Updating file...",
type: "submit",
duration: 0,
});

setTimeout(() => {
removeToast(id);
showToast({
message: "Update complete",
type: "success",
});
}, 2000);