Skip to content

Commit

Permalink
adding a form layout to manage list
Browse files Browse the repository at this point in the history
  • Loading branch information
bbland1 committed Aug 19, 2024
1 parent b83e38b commit c8bcd2f
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions src/views/ManageList.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
export function ManageList() {
const handleSubmit = (e) => {
e.preventDefault();
console.log('hi');
};

return (
<p>
Hello from the <code>/manage-list</code> page!
</p>
<div>
<p>
Hello from the <code>/manage-list</code> page!
</p>
<form onSubmit={handleSubmit}>
<label htmlFor="item">Item Name</label>
<input id="item" type="text" />
<br />
{/* radio inputs for how soon to buy. */}
<input type="radio" id="soon" name="when-to-buy" value="7" />
<label htmlFor="soon">Soon</label>
<br />
<input type="radio" id="kind-of-soon" name="when-to-buy" value="14" />
<label htmlFor="kind-of-soon">Kind of soon</label>
<br />
<input type="radio" id="not-soon" name="when-to-buy" value="30" />
<label htmlFor="not-soon">Not soon</label>
<br />
<button type="submit">Submit Item</button>
</form>
</div>
);
}

0 comments on commit c8bcd2f

Please sign in to comment.