first commit
This commit is contained in:
25
dashboard/components/ui/sonner.tsx
Normal file
25
dashboard/components/ui/sonner.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Toaster as Sonner } from "sonner";
|
||||
|
||||
type ToasterProps = React.ComponentProps<typeof Sonner>;
|
||||
|
||||
const Toaster = ({ ...props }: ToasterProps) => {
|
||||
return (
|
||||
<Sonner
|
||||
className="toaster group"
|
||||
toastOptions={{
|
||||
classNames: {
|
||||
toast: "group toast group-[.toaster]:bg-[#141B2D] group-[.toaster]:text-slate-200 group-[.toaster]:border-slate-800 group-[.toaster]:shadow-2xl group-[.toaster]:rounded-2xl group-[.toaster]:p-4",
|
||||
description: "group-[.toast]:text-slate-500 group-[.toast]:text-[11px] group-[.toast]:font-medium",
|
||||
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
||||
cancelButton: "group-[.toast]:bg-slate-800 group-[.toast]:text-slate-400",
|
||||
success: "group-[.toaster]:border-emerald-500/50 group-[.toaster]:bg-emerald-500/5",
|
||||
error: "group-[.toaster]:border-red-500/50 group-[.toaster]:bg-red-500/5",
|
||||
loading: "group-[.toaster]:border-primary/50 group-[.toaster]:bg-primary/5",
|
||||
},
|
||||
}}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export { Toaster };
|
||||
Reference in New Issue
Block a user