react-go-board

0.9.0 • Public • Published

React Go Board

A simple SVG board in the form of a React component to render a Godash Board.

Resize it by putting it in a sized container.

Getting started

import React from 'react';
import godash from 'godash';
import {Goban} from 'react-go-board';

function handleCoordinateClick(coordinate) {
    // http://duckpunch.github.io/godash/documentation/#coordinate
    coordinate;
}

export default function RenderMe() {
    const board = new godash.Board(19);
    const annotations = [new godash.Coordinate(2, 2)];
    return <Goban
        board={board}
        boardColor='#efefef'
        annotations={annotations}
        onCoordinateClick={handleCoordinateClick} />;
}

Future stuff

  • Optional coordinate labels
  • Annotations (whenever I do annotations for Godash)

Readme

Keywords

Package Sidebar

Install

npm i react-go-board

Weekly Downloads

4

Version

0.9.0

License

ISC

Unpacked Size

1.39 MB

Total Files

9

Last publish

Collaborators

  • duckpunch