@wirelineio/shogiboardjsx
Version:
Shogiboardjsx is a shogiboard for React. Inspired by Chessboardjsx
12 lines • 372 B
JavaScript
import rough from 'roughjs';
export var roughSquare = function roughSquare(_ref) {
var squareElement = _ref.squareElement,
squareWidth = _ref.squareWidth;
var rc = rough.svg(squareElement);
var chessSquare = rc.rectangle(0, 0, squareWidth, squareWidth, {
roughness: 0.8,
fill: '#b58863',
bowing: 2
});
squareElement.appendChild(chessSquare);
};