1- "use client"
1+ "use client" ;
22
3- import * as React from "react"
4- import * as ToastPrimitives from "@radix-ui/react-toast"
5- import { cva , type VariantProps } from "class-variance-authority"
6- import { X } from "lucide-react"
3+ import * as React from "react" ;
4+ import * as ToastPrimitives from "@radix-ui/react-toast" ;
5+ import { cva , type VariantProps } from "class-variance-authority" ;
6+ import { X } from "lucide-react" ;
77
8- import { cn } from "@/lib/utils"
8+ import { cn } from "@/lib/utils" ;
99
10- const ToastProvider = ToastPrimitives . Provider
10+ const ToastProvider = ToastPrimitives . Provider ;
1111
1212const ToastViewport = React . forwardRef <
1313 React . ElementRef < typeof ToastPrimitives . Viewport > ,
@@ -16,16 +16,16 @@ const ToastViewport = React.forwardRef<
1616 < ToastPrimitives . Viewport
1717 ref = { ref }
1818 className = { cn (
19- "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]" ,
19+ "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px] gap-2 " ,
2020 className
2121 ) }
2222 { ...props }
2323 />
24- ) )
25- ToastViewport . displayName = ToastPrimitives . Viewport . displayName
24+ ) ) ;
25+ ToastViewport . displayName = ToastPrimitives . Viewport . displayName ;
2626
2727const toastVariants = cva (
28- "group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[ state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide -out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full " ,
28+ "group data-[state=closed]:slide-out-to-right-full data-[state=open]:sm:slide-in-from-bottom-full relative flex justify-between items-center space-x-2 data-[state=open]:slide-in-from-top-full shadow-lg p-4 pr-6 border rounded-md w-full overflow-hidden transition-all data-[swipe=move]:transition-none data-[swipe= cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out pointer-events-auto data-[state=closed]:fade -out-80 " ,
2929 {
3030 variants : {
3131 variant : {
@@ -38,7 +38,7 @@ const toastVariants = cva(
3838 variant : "default" ,
3939 } ,
4040 }
41- )
41+ ) ;
4242
4343const Toast = React . forwardRef <
4444 React . ElementRef < typeof ToastPrimitives . Root > ,
@@ -51,9 +51,9 @@ const Toast = React.forwardRef<
5151 className = { cn ( toastVariants ( { variant } ) , className ) }
5252 { ...props }
5353 />
54- )
55- } )
56- Toast . displayName = ToastPrimitives . Root . displayName
54+ ) ;
55+ } ) ;
56+ Toast . displayName = ToastPrimitives . Root . displayName ;
5757
5858const ToastAction = React . forwardRef <
5959 React . ElementRef < typeof ToastPrimitives . Action > ,
@@ -67,8 +67,8 @@ const ToastAction = React.forwardRef<
6767 ) }
6868 { ...props }
6969 />
70- ) )
71- ToastAction . displayName = ToastPrimitives . Action . displayName
70+ ) ) ;
71+ ToastAction . displayName = ToastPrimitives . Action . displayName ;
7272
7373const ToastClose = React . forwardRef <
7474 React . ElementRef < typeof ToastPrimitives . Close > ,
@@ -83,10 +83,10 @@ const ToastClose = React.forwardRef<
8383 toast-close = ""
8484 { ...props }
8585 >
86- < X className = "h -4 w -4" />
86+ < X className = "w -4 h -4" />
8787 </ ToastPrimitives . Close >
88- ) )
89- ToastClose . displayName = ToastPrimitives . Close . displayName
88+ ) ) ;
89+ ToastClose . displayName = ToastPrimitives . Close . displayName ;
9090
9191const ToastTitle = React . forwardRef <
9292 React . ElementRef < typeof ToastPrimitives . Title > ,
@@ -97,8 +97,8 @@ const ToastTitle = React.forwardRef<
9797 className = { cn ( "text-sm font-semibold [&+div]:text-xs" , className ) }
9898 { ...props }
9999 />
100- ) )
101- ToastTitle . displayName = ToastPrimitives . Title . displayName
100+ ) ) ;
101+ ToastTitle . displayName = ToastPrimitives . Title . displayName ;
102102
103103const ToastDescription = React . forwardRef <
104104 React . ElementRef < typeof ToastPrimitives . Description > ,
@@ -109,12 +109,12 @@ const ToastDescription = React.forwardRef<
109109 className = { cn ( "text-sm opacity-90" , className ) }
110110 { ...props }
111111 />
112- ) )
113- ToastDescription . displayName = ToastPrimitives . Description . displayName
112+ ) ) ;
113+ ToastDescription . displayName = ToastPrimitives . Description . displayName ;
114114
115- type ToastProps = React . ComponentPropsWithoutRef < typeof Toast >
115+ type ToastProps = React . ComponentPropsWithoutRef < typeof Toast > ;
116116
117- type ToastActionElement = React . ReactElement < typeof ToastAction >
117+ type ToastActionElement = React . ReactElement < typeof ToastAction > ;
118118
119119export {
120120 type ToastProps ,
@@ -126,4 +126,4 @@ export {
126126 ToastDescription ,
127127 ToastClose ,
128128 ToastAction ,
129- }
129+ } ;
0 commit comments