Skip to main content
Version: 1.x

actions

Undo Action

const { showToast, removeToast } = useToast();

showToast({
message: "Item deleted",
type: "warning",
actions: [
{
text: "Undo",
callback: ({ id }) => removeToast(id),
},
],
});

Multiple Actions

showToast({
message: "Unsaved changes",
type: "info",
actions: [
{ text: "Save" },
{ text: "Discard", className: "text-red-500" },
],
});