2025-10-16 10:00:22 +08:00
|
|
|
import { Toaster as SonnerToaster } from "sonner";
|
|
|
|
|
|
|
|
|
|
export function Toaster() {
|
|
|
|
|
return (
|
|
|
|
|
<SonnerToaster
|
|
|
|
|
position="top-right"
|
|
|
|
|
richColors
|
|
|
|
|
theme="system"
|
|
|
|
|
toastOptions={{
|
|
|
|
|
classNames: {
|
2025-10-16 12:13:51 +08:00
|
|
|
toast:
|
|
|
|
|
"group rounded-md border bg-background text-foreground shadow-lg",
|
2025-10-16 10:00:22 +08:00
|
|
|
title: "text-sm font-semibold",
|
|
|
|
|
description: "text-sm text-muted-foreground",
|
|
|
|
|
closeButton:
|
|
|
|
|
"absolute right-2 top-2 rounded-full p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
|
|
|
|
|
actionButton:
|
|
|
|
|
"rounded-md bg-primary px-3 py-1 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90",
|
|
|
|
|
},
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
}
|