Shows a toast notification. Requires one Toaster rendered in the app. Returns the toast's id, for toast.dismiss.
toast({ title: 'Saved', color: 'success' });toast({ title: 'Message deleted', action: { label: 'Undo', onClick: restore } }); Copy
toast({ title: 'Saved', color: 'success' });toast({ title: 'Message deleted', action: { label: 'Undo', onClick: restore } });
Dismisses a toast by id, or all toasts when called without one.
Optional
Shows a toast notification. Requires one Toaster rendered in the app. Returns the toast's id, for toast.dismiss.