Usage
import { useToast } from "@smartacteam/ambient-web/toaster";export const ToastDemo = () => {
const toast = useToast();
return (
<Button
onClick={() => {
toast({
title: "Scheduled: Catch up",
description: "Friday, February 10, 2023 at 5:57 PM",
});
}}
>
Show Toast
</Button>
);
};Variants
The toast component supports five variants: default, info, success, warning, and error. Each variant uses different colors and is appropriate for different types of notifications. When demonstrating multiple variants at once, give every Toast.Root its own state so triggering one toast does not unintentionally toggle the others.