refactor(v4.0.0-alpha): beginning of a new era

This commit is contained in:
Amruth Pillai
2023-11-05 12:31:42 +01:00
parent 0ba6a444e2
commit 22933bd412
505 changed files with 81829 additions and 0 deletions

View File

@ -0,0 +1,37 @@
import {
Toast,
ToastClose,
ToastDescription,
ToastProvider,
ToastTitle,
ToastViewport,
} from "@reactive-resume/ui";
import { useToast } from "../hooks/use-toast";
export const Toaster = () => {
const { toasts } = useToast();
return (
<ToastProvider>
{toasts.map(({ id, icon, title, description, action, ...props }) => {
return (
<Toast key={id} {...props}>
<div className="grid gap-1">
<div className="flex items-center gap-x-2">
{icon}
{title && <ToastTitle>{title}</ToastTitle>}
</div>
{description && <ToastDescription>{description}</ToastDescription>}
</div>
{action}
<ToastClose />
</Toast>
);
})}
<ToastViewport />
</ToastProvider>
);
};