1- " use client"
1+ ' use client'
22
3- import * as React from " react"
4- import * as AlertDialogPrimitive from " @radix-ui/react-alert-dialog"
3+ import * as React from ' react'
4+ import * as AlertDialogPrimitive from ' @radix-ui/react-alert-dialog'
55
6- import { cn } from " @/lib/utils"
7- import { buttonVariants } from " @/components/ui/button"
6+ import { cn } from ' @/lib/utils'
7+ import { buttonVariants } from ' @/components/ui/button'
88
9- function AlertDialog ( {
10- ...props
11- } : React . ComponentProps < typeof AlertDialogPrimitive . Root > ) {
9+ function AlertDialog ( { ...props } : React . ComponentProps < typeof AlertDialogPrimitive . Root > ) {
1210 return < AlertDialogPrimitive . Root data-slot = "alert-dialog" { ...props } />
1311}
1412
1513function AlertDialogTrigger ( {
1614 ...props
1715} : React . ComponentProps < typeof AlertDialogPrimitive . Trigger > ) {
18- return (
19- < AlertDialogPrimitive . Trigger data-slot = "alert-dialog-trigger" { ...props } />
20- )
16+ return < AlertDialogPrimitive . Trigger data-slot = "alert-dialog-trigger" { ...props } />
2117}
2218
23- function AlertDialogPortal ( {
24- ...props
25- } : React . ComponentProps < typeof AlertDialogPrimitive . Portal > ) {
26- return (
27- < AlertDialogPrimitive . Portal data-slot = "alert-dialog-portal" { ...props } />
28- )
19+ function AlertDialogPortal ( { ...props } : React . ComponentProps < typeof AlertDialogPrimitive . Portal > ) {
20+ return < AlertDialogPrimitive . Portal data-slot = "alert-dialog-portal" { ...props } />
2921}
3022
3123function AlertDialogOverlay ( {
@@ -36,7 +28,7 @@ function AlertDialogOverlay({
3628 < AlertDialogPrimitive . Overlay
3729 data-slot = "alert-dialog-overlay"
3830 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" ,
31+ ' 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' ,
4032 className
4133 ) }
4234 { ...props }
@@ -54,7 +46,7 @@ function AlertDialogContent({
5446 < AlertDialogPrimitive . Content
5547 data-slot = "alert-dialog-content"
5648 className = { cn (
57- " 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" ,
49+ ' 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' ,
5850 className
5951 ) }
6052 { ...props }
@@ -63,30 +55,21 @@ function AlertDialogContent({
6355 )
6456}
6557
66- function AlertDialogHeader ( {
67- className,
68- ...props
69- } : React . ComponentProps < "div" > ) {
58+ function AlertDialogHeader ( { className, ...props } : React . ComponentProps < 'div' > ) {
7059 return (
7160 < div
7261 data-slot = "alert-dialog-header"
73- className = { cn ( " flex flex-col gap-2 text-center sm:text-left" , className ) }
62+ className = { cn ( ' flex flex-col gap-2 text-center sm:text-left' , className ) }
7463 { ...props }
7564 />
7665 )
7766}
7867
79- function AlertDialogFooter ( {
80- className,
81- ...props
82- } : React . ComponentProps < "div" > ) {
68+ function AlertDialogFooter ( { className, ...props } : React . ComponentProps < 'div' > ) {
8369 return (
8470 < div
8571 data-slot = "alert-dialog-footer"
86- className = { cn (
87- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end" ,
88- className
89- ) }
72+ className = { cn ( 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end' , className ) }
9073 { ...props }
9174 />
9275 )
@@ -99,7 +82,7 @@ function AlertDialogTitle({
9982 return (
10083 < AlertDialogPrimitive . Title
10184 data-slot = "alert-dialog-title"
102- className = { cn ( " text-lg font-semibold" , className ) }
85+ className = { cn ( ' text-lg font-semibold' , className ) }
10386 { ...props }
10487 />
10588 )
@@ -112,7 +95,7 @@ function AlertDialogDescription({
11295 return (
11396 < AlertDialogPrimitive . Description
11497 data-slot = "alert-dialog-description"
115- className = { cn ( " text-muted-foreground text-sm" , className ) }
98+ className = { cn ( ' text-muted-foreground text-sm' , className ) }
11699 { ...props }
117100 />
118101 )
@@ -122,12 +105,7 @@ function AlertDialogAction({
122105 className,
123106 ...props
124107} : React . ComponentProps < typeof AlertDialogPrimitive . Action > ) {
125- return (
126- < AlertDialogPrimitive . Action
127- className = { cn ( buttonVariants ( ) , className ) }
128- { ...props }
129- />
130- )
108+ return < AlertDialogPrimitive . Action className = { cn ( buttonVariants ( ) , className ) } { ...props } />
131109}
132110
133111function AlertDialogCancel ( {
@@ -136,7 +114,7 @@ function AlertDialogCancel({
136114} : React . ComponentProps < typeof AlertDialogPrimitive . Cancel > ) {
137115 return (
138116 < AlertDialogPrimitive . Cancel
139- className = { cn ( buttonVariants ( { variant : " outline" } ) , className ) }
117+ className = { cn ( buttonVariants ( { variant : ' outline' } ) , className ) }
140118 { ...props }
141119 />
142120 )
0 commit comments