LayoutOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What layoutBracket can be told: the shape (halves or left to right) and the order of the groups.
インポート
import type { LayoutOptions } from "@johnmorrisdotca/taisen-brackets/layout";
ほかのエクスポート元: @johnmorrisdotca/taisen-brackets
定義
interface LayoutOptions {
shape?: "auto" | "halves" | "ltr";
groupOrder?: readonly string[];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
shape (省略可) | "halves" | "ltr" | "auto" | undefined |
|
groupOrder (省略可) | readonly string[] | undefined | The order of the halves' groups, first on the left: |
例
import { layoutBracket, type LayoutOptions } from "@johnmorrisdotca/taisen-brackets";
const options: LayoutOptions = { shape: "ltr" };
console.log(layoutBracket([{ sides: ["Aurora", "Harbour"], score: [2, 1] }, { sides: ["Cascade", "Delta"], score: [0, 1] }, { sides: ["Aurora", "Delta"], score: [3, 1] }], options).shape);ltr出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。