From c20eb3bf001a83892cfd5eab94451347bdec16a6 Mon Sep 17 00:00:00 2001 From: james-tran-3005 Date: Mon, 25 Nov 2024 10:03:44 +0700 Subject: [PATCH] fix(portal): make all side drawer closable by clicking outside --- .../kraken-app-portal/src/components/APIServerDrawer/index.tsx | 2 ++ .../kraken-app-portal/src/components/APIServerModal/index.tsx | 2 ++ .../kraken-app-portal/src/components/APIViewerModal/index.tsx | 2 ++ .../kraken-app-portal/src/components/SpecDrawer/index.tsx | 1 + .../pages/AuditLog/components/AuditLogDetailsModal/index.tsx | 1 + .../components/ActivityDetailModal/index.tsx | 1 + .../MappingTemplate/components/VersionSelect/DetailDrawer.tsx | 1 + .../src/pages/UserManagement/components/UserModal/index.tsx | 1 + 8 files changed, 11 insertions(+) diff --git a/kraken-app/kraken-app-portal/src/components/APIServerDrawer/index.tsx b/kraken-app/kraken-app-portal/src/components/APIServerDrawer/index.tsx index 3d04adf6..04b08544 100644 --- a/kraken-app/kraken-app-portal/src/components/APIServerDrawer/index.tsx +++ b/kraken-app/kraken-app-portal/src/components/APIServerDrawer/index.tsx @@ -94,7 +94,9 @@ const APIServerDrawer = ({ item, isOpen, onClose }: Props) => { zIndex={1100} width={"80vw"} closable={false} + maskClosable open={isOpen} + onClose={onClose} title={ Check details diff --git a/kraken-app/kraken-app-portal/src/components/APIServerModal/index.tsx b/kraken-app/kraken-app-portal/src/components/APIServerModal/index.tsx index d1cc2c86..2748a63a 100644 --- a/kraken-app/kraken-app-portal/src/components/APIServerModal/index.tsx +++ b/kraken-app/kraken-app-portal/src/components/APIServerModal/index.tsx @@ -32,7 +32,9 @@ const APIServerModal = ({ id, isOpen, refresh, onClose }: Props) => { className={styles.drawer} width={"80vw"} closable={false} + maskClosable open={isOpen} + onClose={onClose} footer={ diff --git a/kraken-app/kraken-app-portal/src/components/APIViewerModal/index.tsx b/kraken-app/kraken-app-portal/src/components/APIViewerModal/index.tsx index c3c5bd40..41e38cc5 100644 --- a/kraken-app/kraken-app-portal/src/components/APIViewerModal/index.tsx +++ b/kraken-app/kraken-app-portal/src/components/APIViewerModal/index.tsx @@ -17,6 +17,7 @@ const APIViewerModal = ({ selectedAPI, content, isOpen, onClose }: Props) => { API details @@ -28,6 +29,7 @@ const APIViewerModal = ({ selectedAPI, content, isOpen, onClose }: Props) => { } closable={false} + onClose={onClose} width="70vw" footer={ diff --git a/kraken-app/kraken-app-portal/src/components/SpecDrawer/index.tsx b/kraken-app/kraken-app-portal/src/components/SpecDrawer/index.tsx index a2e04d9c..750d1ad6 100644 --- a/kraken-app/kraken-app-portal/src/components/SpecDrawer/index.tsx +++ b/kraken-app/kraken-app-portal/src/components/SpecDrawer/index.tsx @@ -49,6 +49,7 @@ const SpecDrawer = ({ content, isOpen, onClose }: Props) => { className={styles.drawer} width="90vw" open={isOpen} + maskClosable onClose={onClose} footer={ diff --git a/kraken-app/kraken-app-portal/src/pages/AuditLog/components/AuditLogDetailsModal/index.tsx b/kraken-app/kraken-app-portal/src/pages/AuditLog/components/AuditLogDetailsModal/index.tsx index dc5cbac7..18b0663b 100644 --- a/kraken-app/kraken-app-portal/src/pages/AuditLog/components/AuditLogDetailsModal/index.tsx +++ b/kraken-app/kraken-app-portal/src/pages/AuditLog/components/AuditLogDetailsModal/index.tsx @@ -28,6 +28,7 @@ const AuditLogDetailsModal = ({ open, onClose, item }: Props) => { diff --git a/kraken-app/kraken-app-portal/src/pages/MappingTemplate/components/VersionSelect/DetailDrawer.tsx b/kraken-app/kraken-app-portal/src/pages/MappingTemplate/components/VersionSelect/DetailDrawer.tsx index be1f6d48..e2a4db9e 100644 --- a/kraken-app/kraken-app-portal/src/pages/MappingTemplate/components/VersionSelect/DetailDrawer.tsx +++ b/kraken-app/kraken-app-portal/src/pages/MappingTemplate/components/VersionSelect/DetailDrawer.tsx @@ -20,6 +20,7 @@ export function DetailDrawer({ deploymentId, ...props }: Readonly {