1- import * as React from "react"
2- import * as DialogPrimitive from "@radix-ui/react-dialog"
3- import { XIcon } from "lucide-react"
1+ /* eslint-disable linebreak-style */
2+ /* eslint-disable react/prop-types */
3+ import * as React from 'react' ;
4+ import * as DialogPrimitive from '@radix-ui/react-dialog' ;
5+ import { XIcon } from 'lucide-react' ;
46
5- import { cn } from " @/lib/utils"
7+ import { cn } from ' @/lib/utils' ;
68
79function Dialog ( {
810 ...props
911} : React . ComponentProps < typeof DialogPrimitive . Root > ) {
10- return < DialogPrimitive . Root data-slot = " dialog" { ...props } />
12+ return < DialogPrimitive . Root data-slot = ' dialog' { ...props } /> ;
1113}
1214
1315function DialogTrigger ( {
1416 ...props
1517} : React . ComponentProps < typeof DialogPrimitive . Trigger > ) {
16- return < DialogPrimitive . Trigger data-slot = " dialog-trigger" { ...props } />
18+ return < DialogPrimitive . Trigger data-slot = ' dialog-trigger' { ...props } /> ;
1719}
1820
1921function DialogPortal ( {
2022 ...props
2123} : React . ComponentProps < typeof DialogPrimitive . Portal > ) {
22- return < DialogPrimitive . Portal data-slot = " dialog-portal" { ...props } />
24+ return < DialogPrimitive . Portal data-slot = ' dialog-portal' { ...props } /> ;
2325}
2426
2527function DialogClose ( {
2628 ...props
2729} : React . ComponentProps < typeof DialogPrimitive . Close > ) {
28- return < DialogPrimitive . Close data-slot = " dialog-close" { ...props } />
30+ return < DialogPrimitive . Close data-slot = ' dialog-close' { ...props } /> ;
2931}
3032
3133function DialogOverlay ( {
@@ -34,14 +36,14 @@ function DialogOverlay({
3436} : React . ComponentProps < typeof DialogPrimitive . Overlay > ) {
3537 return (
3638 < DialogPrimitive . Overlay
37- data-slot = " dialog-overlay"
39+ data-slot = ' dialog-overlay'
3840 className = { cn (
39- " 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" ,
40- className
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 ,
4143 ) }
4244 { ...props }
4345 />
44- )
46+ ) ;
4547}
4648
4749function DialogContent ( {
@@ -50,55 +52,55 @@ function DialogContent({
5052 showCloseButton = true ,
5153 ...props
5254} : React . ComponentProps < typeof DialogPrimitive . Content > & {
53- showCloseButton ?: boolean
55+ showCloseButton ?: boolean ;
5456} ) {
5557 return (
56- < DialogPortal data-slot = " dialog-portal" >
58+ < DialogPortal data-slot = ' dialog-portal' >
5759 < DialogOverlay />
5860 < DialogPrimitive . Content
59- data-slot = " dialog-content"
61+ data-slot = ' dialog-content'
6062 className = { cn (
61- " 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" ,
62- className
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 ,
6365 ) }
6466 { ...props }
6567 >
6668 { children }
6769 { showCloseButton && (
6870 < DialogPrimitive . Close
69- data-slot = " dialog-close"
71+ data-slot = ' dialog-close'
7072 className = "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
7173 >
7274 < XIcon />
73- < span className = " sr-only" > Close</ span >
75+ < span className = ' sr-only' > Close</ span >
7476 </ DialogPrimitive . Close >
7577 ) }
7678 </ DialogPrimitive . Content >
7779 </ DialogPortal >
78- )
80+ ) ;
7981}
8082
81- function DialogHeader ( { className, ...props } : React . ComponentProps < " div" > ) {
83+ function DialogHeader ( { className, ...props } : React . ComponentProps < ' div' > ) {
8284 return (
8385 < div
84- data-slot = " dialog-header"
85- className = { cn ( " flex flex-col gap-2 text-center sm:text-left" , className ) }
86+ data-slot = ' dialog-header'
87+ className = { cn ( ' flex flex-col gap-2 text-center sm:text-left' , className ) }
8688 { ...props }
8789 />
88- )
90+ ) ;
8991}
9092
91- function DialogFooter ( { className, ...props } : React . ComponentProps < " div" > ) {
93+ function DialogFooter ( { className, ...props } : React . ComponentProps < ' div' > ) {
9294 return (
9395 < div
94- data-slot = " dialog-footer"
96+ data-slot = ' dialog-footer'
9597 className = { cn (
96- " flex flex-col-reverse gap-2 sm:flex-row sm:justify-end" ,
97- className
98+ ' flex flex-col-reverse gap-2 sm:flex-row sm:justify-end' ,
99+ className ,
98100 ) }
99101 { ...props }
100102 />
101- )
103+ ) ;
102104}
103105
104106function DialogTitle ( {
@@ -107,11 +109,11 @@ function DialogTitle({
107109} : React . ComponentProps < typeof DialogPrimitive . Title > ) {
108110 return (
109111 < DialogPrimitive . Title
110- data-slot = " dialog-title"
111- className = { cn ( " text-lg leading-none font-semibold" , className ) }
112+ data-slot = ' dialog-title'
113+ className = { cn ( ' text-lg leading-none font-semibold' , className ) }
112114 { ...props }
113115 />
114- )
116+ ) ;
115117}
116118
117119function DialogDescription ( {
@@ -120,11 +122,11 @@ function DialogDescription({
120122} : React . ComponentProps < typeof DialogPrimitive . Description > ) {
121123 return (
122124 < DialogPrimitive . Description
123- data-slot = " dialog-description"
124- className = { cn ( " text-muted-foreground text-sm" , className ) }
125+ data-slot = ' dialog-description'
126+ className = { cn ( ' text-muted-foreground text-sm' , className ) }
125127 { ...props }
126128 />
127- )
129+ ) ;
128130}
129131
130132export {
@@ -138,4 +140,4 @@ export {
138140 DialogPortal ,
139141 DialogTitle ,
140142 DialogTrigger ,
141- }
143+ } ;
0 commit comments