Bold the currently selected item in the move list
This commit is contained in:
parent
ce614c136a
commit
2a7fe34019
@ -48,3 +48,7 @@ ol, ul {
|
||||
.game-info {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.selected button {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ import ReactDOM from 'react-dom';
|
||||
import './index.css';
|
||||
|
||||
/*TODO
|
||||
Bold the currently selected item in the move list.
|
||||
Rewrite Board to use two loops to make the squares instead of hardcoding them.
|
||||
Add a toggle button that lets you sort the moves in either ascending or descending order.
|
||||
When someone wins, highlight the three squares that caused the win.
|
||||
@ -107,7 +106,7 @@ class Game extends React.Component {
|
||||
'Go to game start' :
|
||||
`Go to move #${index} [${state.playX}, ${state.playY}]`;
|
||||
return (
|
||||
<li key={index}>
|
||||
<li key={index} className={index === this.state.currentMoveIndex ? 'selected' : null}>
|
||||
<button onClick={() => this.jumpTo(index)}>{description}</button>
|
||||
</li>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user