From 1f6d6ca6b62aabf411b28f80ad2944b1a653ffa3 Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Thu, 14 Dec 2023 22:25:48 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=97=EF=B8=8F=20Form=20refactor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shared/ConnectionForm/ConnectionForm.tsx | 73 ++++++++++++------- 1 file changed, 46 insertions(+), 27 deletions(-) diff --git a/src/client/components/shared/ConnectionForm/ConnectionForm.tsx b/src/client/components/shared/ConnectionForm/ConnectionForm.tsx index 573f1b8..3d42d96 100644 --- a/src/client/components/shared/ConnectionForm/ConnectionForm.tsx +++ b/src/client/components/shared/ConnectionForm/ConnectionForm.tsx @@ -18,7 +18,7 @@ export const ConnectionForm = ({

{formHeading}

- + {({ input, meta }) => (
@@ -26,7 +26,7 @@ export const ConnectionForm = ({ @@ -37,19 +37,30 @@ export const ConnectionForm = ({
- + + {({ input, meta }) => ( +
+ + {meta.error && meta.touched && ( + + {meta.error} + + )} +
+ )} +
{/* port */} {meta.error && meta.touched && ( @@ -60,36 +71,44 @@ export const ConnectionForm = ({ - +
- - + + + +
+
+ + +
- - - -
-

- -

+ + + + +