@@ -14,10 +14,11 @@ const DialogPortal = DialogPrimitive.Portal;
1414
1515const DialogClose = DialogPrimitive . Close ;
1616
17- const DialogOverlay = React . forwardRef <
18- React . ElementRef < typeof DialogPrimitive . Overlay > ,
19- React . ComponentPropsWithoutRef < typeof DialogPrimitive . Overlay >
20- > ( ( { className, ...props } , ref ) => (
17+ const DialogOverlay = ( {
18+ className,
19+ ref,
20+ ...props
21+ } : React . ComponentPropsWithRef < typeof DialogPrimitive . Overlay > ) => (
2122 < DialogPrimitive . Overlay
2223 ref = { ref }
2324 className = { cn (
@@ -26,13 +27,14 @@ const DialogOverlay = React.forwardRef<
2627 ) }
2728 { ...props }
2829 />
29- ) ) ;
30- DialogOverlay . displayName = DialogPrimitive . Overlay . displayName ;
30+ ) ;
3131
32- const DialogContent = React . forwardRef <
33- React . ElementRef < typeof DialogPrimitive . Content > ,
34- React . ComponentPropsWithoutRef < typeof DialogPrimitive . Content >
35- > ( ( { className, children, ...props } , ref ) => (
32+ const DialogContent = ( {
33+ className,
34+ children,
35+ ref,
36+ ...props
37+ } : React . ComponentPropsWithRef < typeof DialogPrimitive . Content > ) => (
3638 < DialogPortal >
3739 < DialogOverlay />
3840 < DialogPrimitive . Content
@@ -50,8 +52,7 @@ const DialogContent = React.forwardRef<
5052 </ DialogPrimitive . Close >
5153 </ DialogPrimitive . Content >
5254 </ DialogPortal >
53- ) ) ;
54- DialogContent . displayName = DialogPrimitive . Content . displayName ;
55+ ) ;
5556
5657const DialogHeader = ( {
5758 className,
@@ -65,7 +66,6 @@ const DialogHeader = ({
6566 { ...props }
6667 />
6768) ;
68- DialogHeader . displayName = "DialogHeader" ;
6969
7070const DialogFooter = ( {
7171 className,
@@ -79,12 +79,12 @@ const DialogFooter = ({
7979 { ...props }
8080 />
8181) ;
82- DialogFooter . displayName = "DialogFooter" ;
8382
84- const DialogTitle = React . forwardRef <
85- React . ElementRef < typeof DialogPrimitive . Title > ,
86- React . ComponentPropsWithoutRef < typeof DialogPrimitive . Title >
87- > ( ( { className, ...props } , ref ) => (
83+ const DialogTitle = ( {
84+ className,
85+ ref,
86+ ...props
87+ } : React . ComponentPropsWithRef < typeof DialogPrimitive . Title > ) => (
8888 < DialogPrimitive . Title
8989 ref = { ref }
9090 className = { cn (
@@ -93,20 +93,19 @@ const DialogTitle = React.forwardRef<
9393 ) }
9494 { ...props }
9595 />
96- ) ) ;
97- DialogTitle . displayName = DialogPrimitive . Title . displayName ;
96+ ) ;
9897
99- const DialogDescription = React . forwardRef <
100- React . ElementRef < typeof DialogPrimitive . Description > ,
101- React . ComponentPropsWithoutRef < typeof DialogPrimitive . Description >
102- > ( ( { className, ...props } , ref ) => (
98+ const DialogDescription = ( {
99+ className,
100+ ref,
101+ ...props
102+ } : React . ComponentPropsWithRef < typeof DialogPrimitive . Description > ) => (
103103 < DialogPrimitive . Description
104104 ref = { ref }
105105 className = { cn ( "text-sm text-muted-foreground" , className ) }
106106 { ...props }
107107 />
108- ) ) ;
109- DialogDescription . displayName = DialogPrimitive . Description . displayName ;
108+ ) ;
110109
111110export {
112111 Dialog ,
0 commit comments