Skip to content

Commit

Permalink
💄 Added styling to new task form
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Carr committed Apr 5, 2022
1 parent 03fc143 commit 5d9f340
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Welcome: FunctionalComponent = () => {

if (hidden) return null

return <section class="mb-4 border-l-4 border-gray-600 p-2 pl-3 font-semibold bg-gray-100">
return <section class="mb-8 border-l-4 border-gray-600 p-2 pl-3 font-semibold bg-gray-100">
<h3>Welcome to tiny-todo!</h3>
<p>A simple todo app that's: tiny 🐜, lightweight 🔦🏋️‍♀️, and performant ⚡. Built using Go &amp; Preact!</p>
<button class="text-sm font-semibold underline underline-dotted hover:underline-solid underline-black" onClick={() => setHidden(true)}>don't show again</button>
Expand Down
10 changes: 7 additions & 3 deletions frontend/src/routes/todos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ const NewTask: FunctionalComponent = () => {
reset()
}

return <form onSubmit={handleSubmit(create)} class="mb-8">
<input placeholder="Use tiny-todo everyday!" {...register('name', { required: true })} />
<input type="submit" value="Create task" />
return <form onSubmit={handleSubmit(create)} class="mb-8 space-y-4">
<input
class="block border-gray-200 border-1 w-full px-4 py-2 rounded-sm focus:border-gray-400 focus:outline-none"
placeholder="Use tiny-todo everyday!"
{...register('name', { required: true })}
/>
<input class="bg-gray-700 text-white px-3 py-1 font-bold hover:bg-black cursor-pointer rounded-sm" type="submit" value="Create task" />
</form>
}

Expand Down

0 comments on commit 5d9f340

Please sign in to comment.