Skip to content

Commit

Permalink
Use <input> s for numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
9at8 committed Jul 1, 2018
1 parent d8aad49 commit 4726c05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ class App extends React.Component {

return (
<div className="App">
<p className={currentPlayer === PLAYER_1 && "Current"}>
Player 1: <span>{this.state[PLAYER_1] / 1000}</span>
<p className={currentPlayer === PLAYER_1 ? "Current" : undefined}>
Player 1: <input value={this.state[PLAYER_1] / 1000} disabled />
</p>
<p className={currentPlayer === PLAYER_2 && "Current"}>
Player 2: <span>{this.state[PLAYER_2] / 1000}</span>
<p className={currentPlayer === PLAYER_2 ? "Current" : undefined}>
Player 2: <input value={this.state[PLAYER_2] / 1000} disabled />
</p>
<button
onClick={() => {
Expand Down

0 comments on commit 4726c05

Please sign in to comment.