1
- import * as React from " react"
2
- import * as AlertDialogPrimitive from " @radix-ui/react-alert-dialog"
1
+ import * as React from ' react'
2
+ import * as AlertDialogPrimitive from ' @radix-ui/react-alert-dialog'
3
3
4
- import { cn } from " @renderer/lib/utils"
5
- import { buttonVariants } from " @renderer/components/ui/button"
4
+ import { cn } from ' @renderer/lib/utils'
5
+ import { buttonVariants } from ' @renderer/components/ui/button'
6
6
7
7
const AlertDialog = AlertDialogPrimitive . Root
8
8
@@ -16,7 +16,7 @@ const AlertDialogOverlay = React.forwardRef<
16
16
> ( ( { className, ...props } , ref ) => (
17
17
< AlertDialogPrimitive . Overlay
18
18
className = { cn (
19
- " 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" ,
19
+ ' 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' ,
20
20
className
21
21
) }
22
22
{ ...props }
@@ -34,7 +34,7 @@ const AlertDialogContent = React.forwardRef<
34
34
< AlertDialogPrimitive . Content
35
35
ref = { ref }
36
36
className = { cn (
37
- " 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" ,
37
+ ' 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' ,
38
38
className
39
39
) }
40
40
{ ...props }
@@ -43,41 +43,26 @@ const AlertDialogContent = React.forwardRef<
43
43
) )
44
44
AlertDialogContent . displayName = AlertDialogPrimitive . Content . displayName
45
45
46
- const AlertDialogHeader = ( {
47
- className,
48
- ...props
49
- } : React . HTMLAttributes < HTMLDivElement > ) => (
50
- < div
51
- className = { cn (
52
- "flex flex-col space-y-2 text-center sm:text-left" ,
53
- className
54
- ) }
55
- { ...props }
56
- />
46
+ const AlertDialogHeader = ( { className, ...props } : React . HTMLAttributes < HTMLDivElement > ) => (
47
+ < div className = { cn ( 'flex flex-col space-y-2 text-center sm:text-left' , className ) } { ...props } />
57
48
)
58
- AlertDialogHeader . displayName = " AlertDialogHeader"
49
+ AlertDialogHeader . displayName = ' AlertDialogHeader'
59
50
60
- const AlertDialogFooter = ( {
61
- className,
62
- ...props
63
- } : React . HTMLAttributes < HTMLDivElement > ) => (
51
+ const AlertDialogFooter = ( { className, ...props } : React . HTMLAttributes < HTMLDivElement > ) => (
64
52
< div
65
- className = { cn (
66
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2" ,
67
- className
68
- ) }
53
+ className = { cn ( 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2' , className ) }
69
54
{ ...props }
70
55
/>
71
56
)
72
- AlertDialogFooter . displayName = " AlertDialogFooter"
57
+ AlertDialogFooter . displayName = ' AlertDialogFooter'
73
58
74
59
const AlertDialogTitle = React . forwardRef <
75
60
React . ElementRef < typeof AlertDialogPrimitive . Title > ,
76
61
React . ComponentPropsWithoutRef < typeof AlertDialogPrimitive . Title >
77
62
> ( ( { className, ...props } , ref ) => (
78
63
< AlertDialogPrimitive . Title
79
64
ref = { ref }
80
- className = { cn ( " text-lg font-semibold" , className ) }
65
+ className = { cn ( ' text-lg font-semibold' , className ) }
81
66
{ ...props }
82
67
/>
83
68
) )
@@ -89,22 +74,17 @@ const AlertDialogDescription = React.forwardRef<
89
74
> ( ( { className, ...props } , ref ) => (
90
75
< AlertDialogPrimitive . Description
91
76
ref = { ref }
92
- className = { cn ( " text-sm text-muted-foreground" , className ) }
77
+ className = { cn ( ' text-sm text-muted-foreground' , className ) }
93
78
{ ...props }
94
79
/>
95
80
) )
96
- AlertDialogDescription . displayName =
97
- AlertDialogPrimitive . Description . displayName
81
+ AlertDialogDescription . displayName = AlertDialogPrimitive . Description . displayName
98
82
99
83
const AlertDialogAction = React . forwardRef <
100
84
React . ElementRef < typeof AlertDialogPrimitive . Action > ,
101
85
React . ComponentPropsWithoutRef < typeof AlertDialogPrimitive . Action >
102
86
> ( ( { className, ...props } , ref ) => (
103
- < AlertDialogPrimitive . Action
104
- ref = { ref }
105
- className = { cn ( buttonVariants ( ) , className ) }
106
- { ...props }
107
- />
87
+ < AlertDialogPrimitive . Action ref = { ref } className = { cn ( buttonVariants ( ) , className ) } { ...props } />
108
88
) )
109
89
AlertDialogAction . displayName = AlertDialogPrimitive . Action . displayName
110
90
@@ -114,11 +94,7 @@ const AlertDialogCancel = React.forwardRef<
114
94
> ( ( { className, ...props } , ref ) => (
115
95
< AlertDialogPrimitive . Cancel
116
96
ref = { ref }
117
- className = { cn (
118
- buttonVariants ( { variant : "outline" } ) ,
119
- "mt-2 sm:mt-0" ,
120
- className
121
- ) }
97
+ className = { cn ( buttonVariants ( { variant : 'outline' } ) , 'mt-2 sm:mt-0' , className ) }
122
98
{ ...props }
123
99
/>
124
100
) )
@@ -135,5 +111,5 @@ export {
135
111
AlertDialogTitle ,
136
112
AlertDialogDescription ,
137
113
AlertDialogAction ,
138
- AlertDialogCancel ,
114
+ AlertDialogCancel
139
115
}
0 commit comments