Skip to content

Commit

Permalink
refactor fall down button
Browse files Browse the repository at this point in the history
  • Loading branch information
huoyijie committed Nov 7, 2023
1 parent c6a1244 commit b1789d2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/Operation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ export default function () {
</div>
</div>

<div className='w-full'>
<button className={`w-full border rounded-lg px-6 py-3 bg-slate-400 text-white focus:outline-none ${btnFallDownDisabled ? 'opacity-50' : 'hover:bg-slate-600 active:bg-slate-400'}`} onClick={fallDown} disabled={btnFallDownDisabled}>Fall down (Space)</button>
</div>
{!gameOver && (
<div className='w-full'>
<button className='w-full border rounded-lg px-6 py-3 bg-slate-400 text-white focus:outline-none hover:bg-slate-600 active:bg-slate-400' onClick={fallDown}>Fall down (Space)</button>
</div>
)}

</div>
)
Expand Down

0 comments on commit b1789d2

Please sign in to comment.