RoadOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What roadToFinal takes besides the finalists or the tournament.
インポート
import type { RoadOptions } from "@johnmorrisdotca/taisen-brackets/road";
ほかのエクスポート元: @johnmorrisdotca/taisen-brackets
定義
interface RoadOptions extends Pick<DrawOptions, "locale" | "words" | "teamName" | "roundNames" | "markShape" | "flags" | "flagHref" | "theme" | "background" | "id" | "className"> {
team?: SideId;
title?: string;
subtitle?: string;
final?: RoadFinal;
labels?: Readonly<Record<string, string>>;
groupLabel?: string;
size?: RoadSize;
winner?: "auto" | "none";
codes?: boolean;
endnote?: string;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
team (省略可) | SideId | undefined | With a tournament: the finalist whose road is on the left (by team id); the other finalist is its opponent in the final. Left out, the first side of the final. |
title (省略可) | string | undefined | The tournament, set large at the top. The language's "Road to the final" when missing. |
subtitle (省略可) | string | undefined | The line under it. "Road to the final" when a |
final (省略可) | RoadFinal | undefined | The final, if it has been played: its score is written between the two big marks, the winner is brighter, and the table has a row for it. A tournament's own final is used when this is left out. |
labels (省略可) | Readonly<Record<string, string>> | undefined | The names of the rounds, by key, over the language's own words: |
groupLabel (省略可) | string | undefined | The group stage's name, over the language's own. |
size (省略可) | SizeName | undefined |
|
winner (省略可) | "auto" | "none" | undefined | Who is brighter: |
codes (省略可) | boolean | undefined | Write the opponent's three-letter code under its mark. On by default. |
endnote (省略可) | string | undefined | A line at the foot: a source, a credit, "Made-up results". |
roundNames (省略可) | readonly string[] | { rounds: readonly { name: string; }[]; } | undefined | Names of the rounds, first round first (or just the last ones). Default: Final, Semi-finals, Quarter-finals, Round of 16… |
locale (省略可) | string | Locale | undefined | The language: |
words (省略可) | Partial<Words> | undefined | Replace any of the language's words. |
teamName (省略可) | ((team: Team, locale: Locale) => string | undefined) | undefined | The name to draw for a team in this language: |
markShape (省略可) | "round" | "none" | "square" | undefined |
|
flags (省略可) | FlagRenderer | undefined | Draws the flag a team's |
flagHref (省略可) | ((code: string) => string | null | undefined) | undefined | The address of the flag a team's |
theme (省略可) | ThemeName | undefined |
|
background (省略可) | boolean | "midnight" | "crimson" | "royal" | "emerald" | "pitch" | "ice" | "hardwood" | "infield" | "turf" | "ball-panels" | "swirl" | "waves" | "glow" | "floodlights" | "confetti" | "carbon" | "aurora" | "sunburst" | "chevrons" | "halftone" | "argyle" | "contour" | "stardust" | "mesh" | "spotlight" | BackgroundOptions | BackgroundImageOptions | undefined | The background. |
id (省略可) | string | undefined | Prefix for the drawing's ids. Default: a hash of the bracket and the options. Only letters, digits, |
className (省略可) | string | undefined | Extra class names for the root |
例
import { roadToFinal, type RoadOptions } from "@johnmorrisdotca/taisen-brackets";
const options: RoadOptions = { title: "Northern Cup 2030", size: "square", codes: true };
console.log(roadToFinal([{ name: "Owls", abbr: "NOW", path: [] }, { name: "Gulls", abbr: "HCG", path: [] }], options).title);Owls and Gulls: Northern Cup 2030, Road to the final出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。