Skip to content

Commit

Permalink
Disables buttons if not able to be used
Browse files Browse the repository at this point in the history
  • Loading branch information
theimpossibleleap committed May 23, 2024
1 parent c395116 commit d335478
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ function App() {
>
</input>
<div className='buttonContainer'>
<button className='button' onClick={handleAdd} tabIndex={0}>
<button className='button' onClick={handleAdd} tabIndex={0} {...{disabled: !inputItem}}>
Add Item
</button>
<button className='button' onClick={handleClearComplete} tabIndex={0}>
<button className='button' onClick={handleClearComplete} tabIndex={0} {...{disabled: !completed.length}}>
Clear Completed
</button>
<button className='button' onClick={handleClear} tabIndex={0}>
<button className='button' onClick={handleClear} tabIndex={0} {...{disabled: !list.length}}>
Clear All
</button>
</div>
Expand Down

0 comments on commit d335478

Please sign in to comment.