From 55869327d9dbdeb2ae927671bd949c155efa1314 Mon Sep 17 00:00:00 2001 From: Sergei Garin Date: Wed, 18 Sep 2024 12:28:05 +0300 Subject: [PATCH] Wip/sergeigarin/fix-focus (#11112) * Fix selecting directory after creating * Fix focusing --- .../AriaComponents/Dialog/Dialog.tsx | 6 ++--- .../InviteUsersModal/InviteUsersModal.tsx | 26 +++++++------------ 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/app/dashboard/src/components/AriaComponents/Dialog/Dialog.tsx b/app/dashboard/src/components/AriaComponents/Dialog/Dialog.tsx index ad8342db1e6..59fd6464f26 100644 --- a/app/dashboard/src/components/AriaComponents/Dialog/Dialog.tsx +++ b/app/dashboard/src/components/AriaComponents/Dialog/Dialog.tsx @@ -151,7 +151,7 @@ const DIALOG_STYLES = tv({ * Can be used to display alerts, confirmations, or other content. */ export function Dialog(props: DialogProps) { const { - children: Children, + children, title, type = 'modal', closeButton = 'normal', @@ -304,9 +304,7 @@ export function Dialog(props: DialogProps) { - {typeof Children === 'function' ? - - : Children} + {typeof children === 'function' ? children(opts) : children} diff --git a/app/dashboard/src/modals/InviteUsersModal/InviteUsersModal.tsx b/app/dashboard/src/modals/InviteUsersModal/InviteUsersModal.tsx index 1a9bf20dfcd..4987b73aebf 100644 --- a/app/dashboard/src/modals/InviteUsersModal/InviteUsersModal.tsx +++ b/app/dashboard/src/modals/InviteUsersModal/InviteUsersModal.tsx @@ -79,23 +79,17 @@ function InviteUsersModalContent(props: InviteUsersModalContentProps) { return ( null}> - {({ currentStep }) => ( - <> - {currentStep === 0 && ( - - )} + + + - {currentStep === 1 && ( - - )} - - )} + + + ) }