-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
82dd24d
commit a01905d
Showing
8 changed files
with
460 additions
and
186 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* eslint-disable react/prop-types */ | ||
import { useForm } from "react-hook-form"; | ||
|
||
const InputField = ({ name, label, type }) => { | ||
const { register } = useForm(); | ||
|
||
return ( | ||
<div className="mt-4"> | ||
<label>{label}</label> | ||
<input | ||
{...register(name, { | ||
required: true, | ||
message: "This field is required", | ||
})} | ||
className="text-body w-full h-12 mt-2 p-4 rounded border-border border" | ||
type={type} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default InputField; |
Oops, something went wrong.