Created
September 10, 2020 05:34
-
-
Save nicolasleal570/73a747a45146ee0a591d23a97c3d49e5 to your computer and use it in GitHub Desktop.
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
import React from "react"; | |
import { SetForm, NavigationProps } from "react-hooks-helper"; | |
import { FormData } from "./StepperForm"; | |
import TextField from "./TextField"; | |
import StepButtons from "./StepButtons"; | |
interface Props { | |
formData: FormData; | |
setForm: SetForm; | |
navigation: NavigationProps; | |
} | |
export default function ({ setForm, formData, navigation }: Props) { | |
const { name, lastName } = formData; | |
return ( | |
<> | |
<h2 className="Title">Basic Info</h2> | |
<TextField | |
type="text" | |
placeholder="John" | |
labelText="Enter your Name" | |
name="name" | |
id="name" | |
value={name} | |
onChange={setForm} | |
/> | |
<TextField | |
type="text" | |
placeholder="Doe" | |
labelText="Enter your Last Name" | |
name="lastName" | |
id="lastName" | |
value={lastName} | |
onChange={setForm} | |
/> | |
<StepButtons navigation={navigation} withPrevious /> | |
</> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment