91adb8661d
* Add example with Magic and Passport.js * Tweaked wording on README * Fixed lint error * Fixed prettier error * Update examples/magic/README.md Removed Download manually section from README Co-Authored-By: Joe Haddad <timer150@gmail.com> * Removed dependency on passport and express + cleanup * Changed ZEIT brand to Vercel * Updated readme instructions and secrets * Renamed example * Changed db comment Co-authored-by: Joe Haddad <timer150@gmail.com> Co-authored-by: Luis Alvarez <luis@zeit.co>
56 lines
1.2 KiB
JavaScript
56 lines
1.2 KiB
JavaScript
const Form = ({ errorMessage, onSubmit }) => (
|
|
<form onSubmit={onSubmit}>
|
|
<label>
|
|
<span>Email</span>
|
|
<input type="email" name="email" required />
|
|
</label>
|
|
|
|
<div className="submit">
|
|
<button type="submit">Sign Up / Login</button>
|
|
</div>
|
|
|
|
{errorMessage && <p className="error">{errorMessage}</p>}
|
|
|
|
<style jsx>{`
|
|
form,
|
|
label {
|
|
display: flex;
|
|
flex-flow: column;
|
|
}
|
|
label > span {
|
|
font-weight: 600;
|
|
}
|
|
input {
|
|
padding: 8px;
|
|
margin: 0.3rem 0 1rem;
|
|
border: 1px solid #ccc;
|
|
border-radius: 4px;
|
|
}
|
|
.submit {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
.submit > a {
|
|
text-decoration: none;
|
|
}
|
|
.submit > button {
|
|
padding: 0.5rem 1rem;
|
|
cursor: pointer;
|
|
background: #fff;
|
|
border: 1px solid #ccc;
|
|
border-radius: 4px;
|
|
}
|
|
.submit > button:hover {
|
|
border-color: #888;
|
|
}
|
|
.error {
|
|
color: brown;
|
|
margin: 1rem 0 0;
|
|
}
|
|
`}</style>
|
|
</form>
|
|
)
|
|
|
|
export default Form
|