diff --git a/src/index.css b/src/index.css index 21e5a88..e27d64d 100644 --- a/src/index.css +++ b/src/index.css @@ -38,7 +38,6 @@ ol, ul { } .square:focus { - background: #8d98e6; outline: none; } diff --git a/src/index.js b/src/index.js index cbe28d8..bbcd3e3 100644 --- a/src/index.js +++ b/src/index.js @@ -70,7 +70,7 @@ function Square(props) { let bg = { backgroundImage: `url(${Images[props.value]})`, backgroundSize: `11vw`, - // backgroundColor: "lightblue", + backgroundColor: props.bg, }; if (props.value != null) { return ( @@ -353,10 +353,13 @@ class Board extends React.Component { } renderSquare(i) { + let bgColor = this.heldPiece() === i ? + "#5D98E6" : "white"; return ( this.handleClick(i)} + bg={bgColor} /> ); }