1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00
chess/app/components/chess-board-square.js

28 lines
524 B
JavaScript

import React from "react";
import classNames from "classnames";
class ChessBoardSquare extends React.Component {
constructor(props) {
super(props);
}
render() {
if (this.props.square == undefined) {
var squareClass = classNames(
"board-square",
)
}
else {
var squareClass = classNames(
"board-square",
this.props.square.type,
this.props.square.colour,
)
}
return <div className={squareClass} />
}
}
export default ChessBoardSquare;