11import { buttonVariants } from "@/components/ui/button"
22import { cn } from "@/lib/utils"
33import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
4- import * as React from "react"
4+ import { forwardRef , ComponentRef , ComponentPropsWithoutRef , HTMLAttributes } from "react"
55
66const AlertDialog = AlertDialogPrimitive . Root
77
88const AlertDialogTrigger = AlertDialogPrimitive . Trigger
99
1010const AlertDialogPortal = AlertDialogPrimitive . Portal
1111
12- const AlertDialogOverlay = React . forwardRef <
13- React . ComponentRef < typeof AlertDialogPrimitive . Overlay > ,
14- React . ComponentPropsWithoutRef < typeof AlertDialogPrimitive . Overlay >
12+ const AlertDialogOverlay = forwardRef <
13+ ComponentRef < typeof AlertDialogPrimitive . Overlay > ,
14+ ComponentPropsWithoutRef < typeof AlertDialogPrimitive . Overlay >
1515> ( ( { className, ...props } , ref ) => (
1616 < AlertDialogPrimitive . Overlay
1717 className = { cn (
@@ -24,9 +24,9 @@ const AlertDialogOverlay = React.forwardRef<
2424) )
2525AlertDialogOverlay . displayName = AlertDialogPrimitive . Overlay . displayName
2626
27- const AlertDialogContent = React . forwardRef <
28- React . ComponentRef < typeof AlertDialogPrimitive . Content > ,
29- React . ComponentPropsWithoutRef < typeof AlertDialogPrimitive . Content >
27+ const AlertDialogContent = forwardRef <
28+ ComponentRef < typeof AlertDialogPrimitive . Content > ,
29+ ComponentPropsWithoutRef < typeof AlertDialogPrimitive . Content >
3030> ( ( { className, ...props } , ref ) => (
3131 < AlertDialogPortal >
3232 < AlertDialogOverlay />
@@ -42,22 +42,22 @@ const AlertDialogContent = React.forwardRef<
4242) )
4343AlertDialogContent . displayName = AlertDialogPrimitive . Content . displayName
4444
45- const AlertDialogHeader = ( { className, ...props } : React . HTMLAttributes < HTMLDivElement > ) => (
45+ const AlertDialogHeader = ( { className, ...props } : HTMLAttributes < HTMLDivElement > ) => (
4646 < div className = { cn ( "flex flex-col space-y-2 text-center sm:text-left" , className ) } { ...props } />
4747)
4848AlertDialogHeader . displayName = "AlertDialogHeader"
4949
50- const AlertDialogFooter = ( { className, ...props } : React . HTMLAttributes < HTMLDivElement > ) => (
50+ const AlertDialogFooter = ( { className, ...props } : HTMLAttributes < HTMLDivElement > ) => (
5151 < div
5252 className = { cn ( "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2" , className ) }
5353 { ...props }
5454 />
5555)
5656AlertDialogFooter . displayName = "AlertDialogFooter"
5757
58- const AlertDialogTitle = React . forwardRef <
59- React . ComponentRef < typeof AlertDialogPrimitive . Title > ,
60- React . ComponentPropsWithoutRef < typeof AlertDialogPrimitive . Title >
58+ const AlertDialogTitle = forwardRef <
59+ ComponentRef < typeof AlertDialogPrimitive . Title > ,
60+ ComponentPropsWithoutRef < typeof AlertDialogPrimitive . Title >
6161> ( ( { className, ...props } , ref ) => (
6262 < AlertDialogPrimitive . Title
6363 ref = { ref }
@@ -67,9 +67,9 @@ const AlertDialogTitle = React.forwardRef<
6767) )
6868AlertDialogTitle . displayName = "AlertDialogTitle"
6969
70- const AlertDialogDescription = React . forwardRef <
71- React . ComponentRef < typeof AlertDialogPrimitive . Description > ,
72- React . ComponentPropsWithoutRef < typeof AlertDialogPrimitive . Description >
70+ const AlertDialogDescription = forwardRef <
71+ ComponentRef < typeof AlertDialogPrimitive . Description > ,
72+ ComponentPropsWithoutRef < typeof AlertDialogPrimitive . Description >
7373> ( ( { className, ...props } , ref ) => (
7474 < AlertDialogPrimitive . Description
7575 ref = { ref }
@@ -79,17 +79,17 @@ const AlertDialogDescription = React.forwardRef<
7979) )
8080AlertDialogDescription . displayName = AlertDialogPrimitive . Description . displayName
8181
82- const AlertDialogAction = React . forwardRef <
83- React . ComponentRef < typeof AlertDialogPrimitive . Action > ,
84- React . ComponentPropsWithoutRef < typeof AlertDialogPrimitive . Action >
82+ const AlertDialogAction = forwardRef <
83+ ComponentRef < typeof AlertDialogPrimitive . Action > ,
84+ ComponentPropsWithoutRef < typeof AlertDialogPrimitive . Action >
8585> ( ( { className, ...props } , ref ) => (
8686 < AlertDialogPrimitive . Action ref = { ref } className = { cn ( buttonVariants ( ) , className ) } { ...props } />
8787) )
8888AlertDialogAction . displayName = AlertDialogPrimitive . Action . displayName
8989
90- const AlertDialogCancel = React . forwardRef <
91- React . ComponentRef < typeof AlertDialogPrimitive . Cancel > ,
92- React . ComponentPropsWithoutRef < typeof AlertDialogPrimitive . Cancel >
90+ const AlertDialogCancel = forwardRef <
91+ ComponentRef < typeof AlertDialogPrimitive . Cancel > ,
92+ ComponentPropsWithoutRef < typeof AlertDialogPrimitive . Cancel >
9393> ( ( { className, ...props } , ref ) => (
9494 < AlertDialogPrimitive . Cancel
9595 ref = { ref }
0 commit comments