Skip to content

Commit

Permalink
try another lib method
Browse files Browse the repository at this point in the history
  • Loading branch information
sawady committed Dec 15, 2021
1 parent 8e060a8 commit 97b8009
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 2 deletions.
40 changes: 40 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 27 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
import App from "./App";
import React from "react";
import "./style/App.css";
import "./style/board.css";
import "./style/cell.css";
import "./style/stone.css";
import { CellInfo } from "@gobstones/gobstones-gbb-parser";
import { BoardComponent } from "./lib/BoardComponent";

export { App };
const App: React.FC = () => {
let boardInfo: CellInfo[][] = new Array(5);
for (let i = 0; i < 5; i++) {
boardInfo[i] = new Array(7);
for (let j = 0; j < 7; j++) {
boardInfo[i][j] = { a: 1, n: 0, r: 3, v: 1 };
}
}
return (
<BoardComponent
editable={true}
columnsQuantity={5}
rowsQuantity={7}
header={[2, 0]}
boardInfo={boardInfo}
theme="modern"
language="es"
/>
);
};
3 changes: 3 additions & 0 deletions src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { BoardComponent } from "./BoardComponent";

export { BoardComponent }

0 comments on commit 97b8009

Please sign in to comment.