You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use case:
In order to display possible valid/legal moves, moves resulting in threats, best moves, and other analytical display, I'd like to be able to use a prop to customize specific board squares. Thus the following would render the g5 square as solid red:
This could, in time, deprecate the use of selectedSquareStyle and selectedSquares since it would allow customization of board display in a number of ways. I would recommend retooling these two properties to simply overwrite (or merge) the value of squareStyles for each entry in selectedSquares with the value of selectedSquareStyle. This should reduce the maintenance of the two similar features.
The text was updated successfully, but these errors were encountered:
Take a look at Square.js in the following commit. It was an easy change that allowed me to delete selectedSquareStyle and squareStyles. It's a much clearer way to style squares.
Use case:
In order to display possible valid/legal moves, moves resulting in threats, best moves, and other analytical display, I'd like to be able to use a prop to customize specific board squares. Thus the following would render the
g5
square as solid red:This could, in time, deprecate the use of
selectedSquareStyle
andselectedSquares
since it would allow customization of board display in a number of ways. I would recommend retooling these two properties to simply overwrite (or merge) the value ofsquareStyles
for each entry inselectedSquares
with the value ofselectedSquareStyle
. This should reduce the maintenance of the two similar features.The text was updated successfully, but these errors were encountered: