StillWorking commited on
Commit
8ffd3a7
·
verified ·
1 Parent(s): 4477912

Upload frontend/src/components/ui/sonner.tsx with huggingface_hub

Browse files
frontend/src/components/ui/sonner.tsx ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Toaster as Sonner } from "sonner";
2
+
3
+ type ToasterProps = React.ComponentProps<typeof Sonner>;
4
+
5
+ const Toaster = ({ ...props }: ToasterProps) => {
6
+ return (
7
+ <Sonner
8
+ className="toaster group"
9
+ toastOptions={{
10
+ classNames: {
11
+ toast:
12
+ "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
13
+ description: "group-[.toast]:text-muted-foreground",
14
+ actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
15
+ cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
16
+ },
17
+ }}
18
+ {...props}
19
+ />
20
+ );
21
+ };
22
+
23
+ export { Toaster };