Skip to content

Instantly share code, notes, and snippets.

@reciosonny
Created December 19, 2019 12:01
Show Gist options
  • Select an option

  • Save reciosonny/3588f275be27b22fe68a40e910c7955a to your computer and use it in GitHub Desktop.

Select an option

Save reciosonny/3588f275be27b22fe68a40e910c7955a to your computer and use it in GitHub Desktop.
function PersonalInformation({
firstName,
middleName,
lastName,
setFirstName,
setMiddleName,
setLastName
}) {
return (
<div>
<h1 style={{ textAlign: "center" }}>Please fill up the details</h1>
<div style={{ margin: "0 auto", width: "350px" }}>
<h3>First name:</h3>
<input onChange={e => setFirstName(e.target.value)} />
<h3>Middle name:</h3>
<input onChange={e => setMiddleName(e.target.value)} />
<h3>Last name:</h3>
<input onChange={e => setLastName(e.target.value)} />
</div>
<h1 style={{ textAlign: "center" }}>Results</h1>
<div style={{ margin: "0 auto", width: "350px" }}>
<h3>First name: {firstName} </h3>
<h3>Middle name: {middleName} </h3>
<h3>Last name: {lastName} </h3>
</div>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment