JudoQueueOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What a mat queue can be told: the size, the theme, how many rows, whether the first contest is marked as the current one, and the mat colours.
インポート
import type { JudoQueueOptions } from "@johnmorrisdotca/taisen-brackets";
定義
interface JudoQueueOptions extends Omit<JudoBoardOptions, "style" | "coaches"> {
rows?: number;
current?: boolean;
colors?: readonly string[];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
rows (省略可) | number | undefined | The most contests drawn for a mat. Default: as many as fit at a readable size, up to 12. |
current (省略可) | boolean | undefined | Show the first contest of each mat as the one on now (a green number). Default true. |
colors (省略可) | readonly string[] | undefined | The colours the mats take in turn where a mat names none. Hex codes. |
title (省略可) | string | undefined | The |
locale (省略可) | string | Locale | undefined | The language: |
words (省略可) | Partial<Words> | undefined | |
flags (省略可) | FlagRenderer | undefined | Draws a country's flag from its code, as for |
flagHref (省略可) | ((code: string) => string | null | undefined) | undefined | The address of a flag as a picture to load, tried where |
theme (省略可) | "auto" | "light" | "dark" | undefined |
|
id (省略可) | string | undefined | Prefix for the drawing's ids. Default: a hash of the state and the options. |
className (省略可) | string | undefined | |
size (省略可) | JudoBoardSizeName | { width: number; height: number; } | undefined |
|
swap (省略可) | boolean | undefined | Draw blue first (on the left, or at the top) in place of white. Default false. |
例
import { judoMatQueue, type JudoQueueOptions } from "@johnmorrisdotca/taisen-brackets";
const options: JudoQueueOptions = { size: "tv", theme: "dark", rows: 4, current: true };
console.log(judoMatQueue({ mat: 1, contests: [{ number: 1, white: { name: "A" }, blue: { name: "B" } }] }, options).startsWith("<svg"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。