BoutBoardOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What a bout board can be told: the name style and case, and the options of every broadcast board.
インポート
import type { BoutBoardOptions } from "@johnmorrisdotca/taisen-brackets";
定義
interface BoutBoardOptions extends BroadcastOptions, Pick<RankingOptions, "nameStyle"> {
nameCase?: "as-is" | "upper";
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
nameCase (省略可) | "as-is" | "upper" | undefined |
|
width (省略可) | number | undefined | The width of the board; the height follows from the rows. Default 1280, from 320 to 4000. |
look (省略可) | BroadcastLook | undefined |
|
icon (省略可) | BroadcastIcon | undefined | The icon in the square at the left of the title: |
iconMark (省略可) | string | undefined | A mark of your own for that square (inline SVG or an image address), in place of |
flags (省略可) | FlagRenderer | undefined | Draws a 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 |
locale (省略可) | string | Locale | undefined | |
words (省略可) | Partial<Words> | undefined | |
title (省略可) | string | undefined | The |
id (省略可) | string | undefined | |
className (省略可) | string | undefined | |
nameStyle (省略可) | "surname-first" | "given-first" | "as-is" | undefined |
|
例
import { boutBoard, type BoutBoardOptions } from "@johnmorrisdotca/taisen-brackets";
const options: BoutBoardOptions = { width: 960, look: "night", nameCase: "upper" };
console.log(boutBoard({
title: "Women's 57-60 kg",
phase: "Preliminaries",
bout: 142,
red: { code: "BRA", flag: "BR", name: "TAVARES M." },
blue: { code: "USA", flag: "US", name: "MAYER M." },
officials: [{ role: "referee", code: "MGL", flag: "MN", name: "KHISHIGEE Khas-Erdene" }, { code: "POL", flag: "PL", name: "GORNY Mariusz" }],
}, options).startsWith("<svg"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。