Reference · Where every tie sits
LayoutOptionstype
What layoutBracket can be told: the shape (halves or left to right) and the order of the groups.
Import it
import type { LayoutOptions } from "@johnmorrisdotca/taisen-brackets/layout";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
interface LayoutOptions {
shape?: "auto" | "halves" | "ltr";
groupOrder?: readonly string[];
}
Members
| Name | Type | Description |
|---|---|---|
shape (optional) | "halves" | "ltr" | "auto" | undefined |
|
groupOrder (optional) | readonly string[] | undefined | The order of the halves' groups, first on the left: |
Examples
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);ltrWhat it prints (run when this page was built)