1
- import * as React from "react"
2
- import * as DialogPrimitive from "@radix-ui/ react-dialog"
3
- import { X } from "lucide- react"
1
+ import * as DialogPrimitive from "@radix-ui/ react-dialog" ;
2
+ import { X } from "lucide- react" ;
3
+ import * as React from "react" ;
4
4
5
- import { cn } from "~/lib/utils"
5
+ import { cn } from "~/lib/utils" ;
6
6
7
- const Dialog = DialogPrimitive . Root
7
+ const Dialog = DialogPrimitive . Root ;
8
8
9
- const DialogTrigger = DialogPrimitive . Trigger
9
+ const DialogTrigger = DialogPrimitive . Trigger ;
10
10
11
- const DialogPortal = DialogPrimitive . Portal
11
+ const DialogPortal = DialogPrimitive . Portal ;
12
12
13
- const DialogClose = DialogPrimitive . Close
13
+ const DialogClose = DialogPrimitive . Close ;
14
14
15
15
const DialogOverlay = React . forwardRef <
16
16
React . ElementRef < typeof DialogPrimitive . Overlay > ,
@@ -19,13 +19,13 @@ const DialogOverlay = React.forwardRef<
19
19
< DialogPrimitive . Overlay
20
20
ref = { ref }
21
21
className = { cn (
22
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" ,
23
- className
22
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" ,
23
+ className ,
24
24
) }
25
25
{ ...props }
26
26
/>
27
- ) )
28
- DialogOverlay . displayName = DialogPrimitive . Overlay . displayName
27
+ ) ) ;
28
+ DialogOverlay . displayName = DialogPrimitive . Overlay . displayName ;
29
29
30
30
const DialogContent = React . forwardRef <
31
31
React . ElementRef < typeof DialogPrimitive . Content > ,
@@ -37,7 +37,7 @@ const DialogContent = React.forwardRef<
37
37
ref = { ref }
38
38
className = { cn (
39
39
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg" ,
40
- className
40
+ className ,
41
41
) }
42
42
{ ...props }
43
43
>
@@ -48,8 +48,8 @@ const DialogContent = React.forwardRef<
48
48
</ DialogPrimitive . Close >
49
49
</ DialogPrimitive . Content >
50
50
</ DialogPortal >
51
- ) )
52
- DialogContent . displayName = DialogPrimitive . Content . displayName
51
+ ) ) ;
52
+ DialogContent . displayName = DialogPrimitive . Content . displayName ;
53
53
54
54
const DialogHeader = ( {
55
55
className,
@@ -58,12 +58,12 @@ const DialogHeader = ({
58
58
< div
59
59
className = { cn (
60
60
"flex flex-col space-y-1.5 text-center sm:text-left" ,
61
- className
61
+ className ,
62
62
) }
63
63
{ ...props }
64
64
/>
65
- )
66
- DialogHeader . displayName = "DialogHeader"
65
+ ) ;
66
+ DialogHeader . displayName = "DialogHeader" ;
67
67
68
68
const DialogFooter = ( {
69
69
className,
@@ -72,12 +72,12 @@ const DialogFooter = ({
72
72
< div
73
73
className = { cn (
74
74
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2" ,
75
- className
75
+ className ,
76
76
) }
77
77
{ ...props }
78
78
/>
79
- )
80
- DialogFooter . displayName = "DialogFooter"
79
+ ) ;
80
+ DialogFooter . displayName = "DialogFooter" ;
81
81
82
82
const DialogTitle = React . forwardRef <
83
83
React . ElementRef < typeof DialogPrimitive . Title > ,
@@ -87,12 +87,12 @@ const DialogTitle = React.forwardRef<
87
87
ref = { ref }
88
88
className = { cn (
89
89
"text-lg font-semibold leading-none tracking-tight" ,
90
- className
90
+ className ,
91
91
) }
92
92
{ ...props }
93
93
/>
94
- ) )
95
- DialogTitle . displayName = DialogPrimitive . Title . displayName
94
+ ) ) ;
95
+ DialogTitle . displayName = DialogPrimitive . Title . displayName ;
96
96
97
97
const DialogDescription = React . forwardRef <
98
98
React . ElementRef < typeof DialogPrimitive . Description > ,
@@ -103,18 +103,18 @@ const DialogDescription = React.forwardRef<
103
103
className = { cn ( "text-sm text-muted-foreground" , className ) }
104
104
{ ...props }
105
105
/>
106
- ) )
107
- DialogDescription . displayName = DialogPrimitive . Description . displayName
106
+ ) ) ;
107
+ DialogDescription . displayName = DialogPrimitive . Description . displayName ;
108
108
109
109
export {
110
110
Dialog ,
111
- DialogPortal ,
112
- DialogOverlay ,
113
111
DialogClose ,
114
- DialogTrigger ,
115
112
DialogContent ,
116
- DialogHeader ,
113
+ DialogDescription ,
117
114
DialogFooter ,
115
+ DialogHeader ,
116
+ DialogOverlay ,
117
+ DialogPortal ,
118
118
DialogTitle ,
119
- DialogDescription ,
120
- }
119
+ DialogTrigger ,
120
+ } ;
0 commit comments