From 87a83a5604b20550430ef4eefbcd573d309694e2 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Sun, 22 Jun 2025 10:02:50 +0200 Subject: Initial commit --- apps/web/src/components/ui/toaster.tsx | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 apps/web/src/components/ui/toaster.tsx (limited to 'apps/web/src/components/ui/toaster.tsx') diff --git a/apps/web/src/components/ui/toaster.tsx b/apps/web/src/components/ui/toaster.tsx new file mode 100644 index 00000000..3eb8a720 --- /dev/null +++ b/apps/web/src/components/ui/toaster.tsx @@ -0,0 +1,35 @@ +"use client"; + +import { useToast } from "../../hooks/use-toast"; +import { + Toast, + ToastClose, + ToastDescription, + ToastProvider, + ToastTitle, + ToastViewport, +} from "./toast"; + +export function Toaster() { + const { toasts } = useToast(); + + return ( + + {toasts.map(function ({ id, title, description, action, ...props }) { + return ( + +
+ {title && {title}} + {description && ( + {description} + )} +
+ {action} + +
+ ); + })} + +
+ ); +} -- cgit v1.3.1