From a2cbc7584a49db126840de38165d74e74f1144e8 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Wed, 12 Jul 2023 15:44:52 -0300 Subject: [PATCH] get height by size props --- src/frontend/src/modals/baseModal/index.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/frontend/src/modals/baseModal/index.tsx b/src/frontend/src/modals/baseModal/index.tsx index c17c9e4ba..c7053816a 100644 --- a/src/frontend/src/modals/baseModal/index.tsx +++ b/src/frontend/src/modals/baseModal/index.tsx @@ -59,20 +59,25 @@ function BaseModal({ (child) => (child as React.ReactElement).type === Content ); - let sizeClass = ""; + let minWidth: string; + let height: string; switch (size) { case "small": - sizeClass = "min-w-[40vw]"; + minWidth = "min-w-[40vw]"; + height = "h-[40vh]"; break; case "medium": - sizeClass = "min-w-[60vw]"; + minWidth = "min-w-[60vw]"; + height = "h-[60vh]"; break; case "large": - sizeClass = "min-w-[80vw]"; + minWidth = "min-w-[80vw]"; + height = "h-[80vh]"; break; default: - sizeClass = "min-w-[80vw]"; + minWidth = "min-w-[80vw]"; + height = "h-[80vh]"; break; } @@ -80,9 +85,9 @@ function BaseModal({ return ( - + {headerChild} -
{ContentChild}
+
{ContentChild}
);