From 2983dab8405b7cea948bd3df2e27d04489cd3c11 Mon Sep 17 00:00:00 2001 From: Rohid Date: Tue, 26 Sep 2023 16:13:06 +0600 Subject: [PATCH] fix(www): unnecessary portal component removed --- apps/www/registry/default/ui/alert-dialog.tsx | 12 ++---------- apps/www/registry/default/ui/dialog.tsx | 12 ++---------- apps/www/registry/new-york/ui/alert-dialog.tsx | 12 ++---------- apps/www/registry/new-york/ui/dialog.tsx | 12 ++---------- 4 files changed, 8 insertions(+), 40 deletions(-) diff --git a/apps/www/registry/default/ui/alert-dialog.tsx b/apps/www/registry/default/ui/alert-dialog.tsx index 35bcef95edc..a17294f2d7c 100644 --- a/apps/www/registry/default/ui/alert-dialog.tsx +++ b/apps/www/registry/default/ui/alert-dialog.tsx @@ -10,14 +10,6 @@ const AlertDialog = AlertDialogPrimitive.Root const AlertDialogTrigger = AlertDialogPrimitive.Trigger -const AlertDialogPortal = ({ - className, - ...props -}: AlertDialogPrimitive.AlertDialogPortalProps) => ( - -) -AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName - const AlertDialogOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -37,7 +29,7 @@ const AlertDialogContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( - + - + )) AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName diff --git a/apps/www/registry/default/ui/dialog.tsx b/apps/www/registry/default/ui/dialog.tsx index 2f337660022..0bc7d889bc3 100644 --- a/apps/www/registry/default/ui/dialog.tsx +++ b/apps/www/registry/default/ui/dialog.tsx @@ -10,14 +10,6 @@ const Dialog = DialogPrimitive.Root const DialogTrigger = DialogPrimitive.Trigger -const DialogPortal = ({ - className, - ...props -}: DialogPrimitive.DialogPortalProps) => ( - -) -DialogPortal.displayName = DialogPrimitive.Portal.displayName - const DialogOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -37,7 +29,7 @@ const DialogContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, children, ...props }, ref) => ( - + Close - + )) DialogContent.displayName = DialogPrimitive.Content.displayName diff --git a/apps/www/registry/new-york/ui/alert-dialog.tsx b/apps/www/registry/new-york/ui/alert-dialog.tsx index 03e37132cd3..14f9ba3762a 100644 --- a/apps/www/registry/new-york/ui/alert-dialog.tsx +++ b/apps/www/registry/new-york/ui/alert-dialog.tsx @@ -10,14 +10,6 @@ const AlertDialog = AlertDialogPrimitive.Root const AlertDialogTrigger = AlertDialogPrimitive.Trigger -const AlertDialogPortal = ({ - className, - ...props -}: AlertDialogPrimitive.AlertDialogPortalProps) => ( - -) -AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName - const AlertDialogOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -37,7 +29,7 @@ const AlertDialogContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( - + - + )) AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName diff --git a/apps/www/registry/new-york/ui/dialog.tsx b/apps/www/registry/new-york/ui/dialog.tsx index 8cbe0d424e2..5e9bac9cfaa 100644 --- a/apps/www/registry/new-york/ui/dialog.tsx +++ b/apps/www/registry/new-york/ui/dialog.tsx @@ -10,14 +10,6 @@ const Dialog = DialogPrimitive.Root const DialogTrigger = DialogPrimitive.Trigger -const DialogPortal = ({ - className, - ...props -}: DialogPrimitive.DialogPortalProps) => ( - -) -DialogPortal.displayName = DialogPrimitive.Portal.displayName - const DialogOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -37,7 +29,7 @@ const DialogContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, children, ...props }, ref) => ( - + Close - + )) DialogContent.displayName = DialogPrimitive.Content.displayName