Skip to content

Instantly share code, notes, and snippets.

@epocolis
Created April 11, 2021 21:25
Show Gist options
  • Select an option

  • Save epocolis/0b8c752374ba7ca3e4420853cfda655a to your computer and use it in GitHub Desktop.

Select an option

Save epocolis/0b8c752374ba7ca3e4420853cfda655a to your computer and use it in GitHub Desktop.
<div className="container flex mx-auto max-w-screen-md items-center h-screen ">
{formType === 'signUp' && (
<div>
<input
className="text-sm w-full mr-3 py-5 px-4 h-2 border rounded mb-2"
type="text"
name="username"
onChange={onChange}
placeholder="username"
/>
<input
className="text-sm w-full mr-3 py-5 px-4 h-2 border rounded mb-2"
type="password"
name="password"
onChange={onChange}
placeholder="password"
/>
<input
className="text-sm w-full mr-3 py-5 px-4 h-2 border rounded mb-2"
type="email"
name="email"
onChange={onChange}
placeholder="email"
/>
<button
onClick={signUp}
className="bg-blue-500 text-white w-full rounded h-8 font-bold"
>
Sign Up
</button>
<button
className="bg-blue-500 text-white w-full rounded h-8 font-bold mt-5"
onClick={() =>
updateFormState(() => ({
...formState,
formType: 'signIn',
}))
}
>
Sign In
</button>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment