1
- "use client"
1
+ "use client" ;
2
2
3
- import * as React from "react"
4
- import * as DialogPrimitive from "@radix-ui/react-dialog"
5
- import { XIcon } from "lucide-react"
3
+ import * as React from "react" ;
4
+ import * as DialogPrimitive from "@radix-ui/react-dialog" ;
5
+ import { XIcon } from "lucide-react" ;
6
6
7
- import { cn } from "@/lib/utils"
7
+ import { cn } from "@/lib/utils" ;
8
8
9
9
function Dialog ( {
10
10
...props
11
11
} : React . ComponentProps < typeof DialogPrimitive . Root > ) {
12
- return < DialogPrimitive . Root data-slot = "dialog" { ...props } />
12
+ return < DialogPrimitive . Root data-slot = "dialog" { ...props } /> ;
13
13
}
14
14
15
15
function DialogTrigger ( {
16
16
...props
17
17
} : React . ComponentProps < typeof DialogPrimitive . Trigger > ) {
18
- return < DialogPrimitive . Trigger data-slot = "dialog-trigger" { ...props } />
18
+ return < DialogPrimitive . Trigger data-slot = "dialog-trigger" { ...props } /> ;
19
19
}
20
20
21
21
function DialogPortal ( {
22
22
...props
23
23
} : React . ComponentProps < typeof DialogPrimitive . Portal > ) {
24
- return < DialogPrimitive . Portal data-slot = "dialog-portal" { ...props } />
24
+ return < DialogPrimitive . Portal data-slot = "dialog-portal" { ...props } /> ;
25
25
}
26
26
27
27
function DialogClose ( {
28
28
...props
29
29
} : React . ComponentProps < typeof DialogPrimitive . Close > ) {
30
- return < DialogPrimitive . Close data-slot = "dialog-close" { ...props } />
30
+ return < DialogPrimitive . Close data-slot = "dialog-close" { ...props } /> ;
31
31
}
32
32
33
33
function DialogOverlay ( {
@@ -39,11 +39,11 @@ function DialogOverlay({
39
39
data-slot = "dialog-overlay"
40
40
className = { cn (
41
41
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50" ,
42
- className
42
+ className ,
43
43
) }
44
44
{ ...props }
45
45
/>
46
- )
46
+ ) ;
47
47
}
48
48
49
49
function DialogContent ( {
@@ -52,7 +52,7 @@ function DialogContent({
52
52
showCloseButton = true ,
53
53
...props
54
54
} : React . ComponentProps < typeof DialogPrimitive . Content > & {
55
- showCloseButton ?: boolean
55
+ showCloseButton ?: boolean ;
56
56
} ) {
57
57
return (
58
58
< DialogPortal data-slot = "dialog-portal" >
@@ -61,7 +61,7 @@ function DialogContent({
61
61
data-slot = "dialog-content"
62
62
className = { cn (
63
63
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg" ,
64
- className
64
+ className ,
65
65
) }
66
66
{ ...props }
67
67
>
@@ -77,7 +77,7 @@ function DialogContent({
77
77
) }
78
78
</ DialogPrimitive . Content >
79
79
</ DialogPortal >
80
- )
80
+ ) ;
81
81
}
82
82
83
83
function DialogHeader ( { className, ...props } : React . ComponentProps < "div" > ) {
@@ -87,7 +87,7 @@ function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
87
87
className = { cn ( "flex flex-col gap-2 text-center sm:text-left" , className ) }
88
88
{ ...props }
89
89
/>
90
- )
90
+ ) ;
91
91
}
92
92
93
93
function DialogFooter ( { className, ...props } : React . ComponentProps < "div" > ) {
@@ -96,11 +96,11 @@ function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {
96
96
data-slot = "dialog-footer"
97
97
className = { cn (
98
98
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end" ,
99
- className
99
+ className ,
100
100
) }
101
101
{ ...props }
102
102
/>
103
- )
103
+ ) ;
104
104
}
105
105
106
106
function DialogTitle ( {
@@ -113,7 +113,7 @@ function DialogTitle({
113
113
className = { cn ( "text-lg leading-none font-semibold" , className ) }
114
114
{ ...props }
115
115
/>
116
- )
116
+ ) ;
117
117
}
118
118
119
119
function DialogDescription ( {
@@ -126,7 +126,7 @@ function DialogDescription({
126
126
className = { cn ( "text-muted-foreground text-sm" , className ) }
127
127
{ ...props }
128
128
/>
129
- )
129
+ ) ;
130
130
}
131
131
132
132
export {
@@ -140,4 +140,4 @@ export {
140
140
DialogPortal ,
141
141
DialogTitle ,
142
142
DialogTrigger ,
143
- }
143
+ } ;
0 commit comments