TenkaMap関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
THE WORLD, AS A REACT COMPONENT: every territory in its owner's colour,
its counter of armies, the rings of a choice, and a press on a territory
or its counter reported by number. It draws; the rules stay in
playTenka, and what a press means in tapTerritory. Scales to its
container's width; style .tk-land, .tk-sea and the rest as you like.
Where a press is wanted, each territory can be reached by Tab and pressed
with Enter or Space.
インポート
import { TenkaMap } from "@johnmorrisdotca/tenka/react";
定義
function TenkaMap({ game, marks, colours, onTerritory, label, ...svg }: TenkaMapProps): React.JSX.Element
引数
| 名前 | 型 | 説明 |
|---|---|---|
options | TenkaMapProps | The component, table or display options. |
戻り値
React.JSX.Element
The React SVG map element.
例
import {createElement} from "react";
import { TenkaMap } from "@johnmorrisdotca/tenka/react";
import {startTenka} from "@johnmorrisdotca/tenka";
const game = startTenka(10,["Seat 1","Seat 2"],42)!;
console.log(createElement(TenkaMap,{game}));この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。