From 73829d14d82132172f64f46459e32fb6d2b7dd38 Mon Sep 17 00:00:00 2001 From: mahdi andalib Date: Fri, 29 Apr 2022 13:45:09 +0430 Subject: [PATCH] update App.js, src/components/FormInput/index.js and src/components/TestComponentNew/index.js --- src/App.js | 2 +- src/components/FormInput/index.js | 31 ++++++++++++++++----- src/components/TestComponentNew/index.js | 34 +++++++++++++++++++++++- 3 files changed, 59 insertions(+), 8 deletions(-) diff --git a/src/App.js b/src/App.js index 1f64b31..515d438 100644 --- a/src/App.js +++ b/src/App.js @@ -271,7 +271,7 @@ function App() { {/* */} {/* */} - {/* */} + ); diff --git a/src/components/FormInput/index.js b/src/components/FormInput/index.js index 0acea19..1050a02 100644 --- a/src/components/FormInput/index.js +++ b/src/components/FormInput/index.js @@ -6,12 +6,31 @@ import Input from "./Input"; const FormInput = () => { const { register, getValues } = useForm(); return ( -
- +
+ {/* right */} +
+ +
+ {/* middle */} +
+ +
+ {/* left */} +
+ +
); }; diff --git a/src/components/TestComponentNew/index.js b/src/components/TestComponentNew/index.js index c4bee1c..34b28f9 100644 --- a/src/components/TestComponentNew/index.js +++ b/src/components/TestComponentNew/index.js @@ -1,7 +1,39 @@ import React from "react"; +import { useForm } from "react-hook-form"; + +import Input from "../FormInput/Input"; + const TestComponentNew = () => { - return
TestComponentNew
; + const { register, getValues } = useForm(); + + return ( +
+
+
+ +
+
+ +
+
+ +
+
+
+ ); }; export default TestComponentNew;