From d6a905f374c49ab30e638f78d0a4c7af4f4b6133 Mon Sep 17 00:00:00 2001 From: Rohan Chakraborty Date: Fri, 31 Oct 2025 16:37:33 +0530 Subject: [PATCH] feat: add scrollable overlay in dialog --- .../raystack/components/dialog/dialog.tsx | 45 +++++++++++++------ 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/packages/raystack/components/dialog/dialog.tsx b/packages/raystack/components/dialog/dialog.tsx index fd456fd46..6d3642ee1 100644 --- a/packages/raystack/components/dialog/dialog.tsx +++ b/packages/raystack/components/dialog/dialog.tsx @@ -21,6 +21,7 @@ export interface DialogContentProps overlayClassName?: string; overlayStyle?: React.CSSProperties; width?: string | number; + scrollableOverlay?: boolean; } const DialogContent = forwardRef< @@ -37,21 +38,23 @@ const DialogContent = forwardRef< overlayClassName, overlayStyle, width, + scrollableOverlay = false, ...props }, ref - ) => ( - - - ) + ); + return ( + + {scrollableOverlay ? ( + + {content} + + ) : ( + <> + + {content} + + )} + + ); + } ); DialogContent.displayName = DialogPrimitive.Content.displayName;