mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
0eb3775416
## Summary While reviewing the examples in the Next.js repository for potential improvements, I noticed a redundant `justify-content` declaration in the `.submit` styles. ## Changes - Removed the redundant `justify-content: flex-end` declaration. - Kept `justify-content: space-between`, which overrides the previous declaration. ## Testing No functional changes. This is a CSS cleanup only. Co-authored-by: Marcos Hernanz <96699542+marcoshernanz@users.noreply.github.com>
56 lines
1.1 KiB
JavaScript
56 lines
1.1 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;
|
|
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;
|