Skip to content

Commit

Permalink
use label element to click task checkbox easily, rather than div
Browse files Browse the repository at this point in the history
  • Loading branch information
tak-onda committed Mar 27, 2024
1 parent df661bc commit 76491d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ function App() {
</label>
<hr />
{views.map((task) => (
<div key={task.id}>
<label key={task.id} style={{ display: 'block' }}>
<input type="checkbox" checked={task.done} onChange={() => onCheck(task)} />
{task.done ? <s>{task.name}</s> : task.name}
</div>
</label>
))}
</>
)}
Expand Down

0 comments on commit 76491d2

Please sign in to comment.