Reference · Where every tie sits
LayoutSidetype
One half of a bracket: its boxes, its rows and the name of its group.
Import it
import type { LayoutSide } from "@johnmorrisdotca/taisen-brackets/layout";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
interface LayoutSide {
key: "l" | "r";
label: string | null;
boxes: LayoutBox[];
rows: number;
}
Members
| Name | Type | Description |
|---|---|---|
key | "l" | "r" |
|
label | string | null | The group's name when the half is one group (a conference). |
boxes | LayoutBox[] | |
rows | number |
Examples
import { layoutBracket, type LayoutSide } from "@johnmorrisdotca/taisen-brackets";
const layout = layoutBracket([{ sides: ["Aurora", "Harbour"], score: [2, 1] }, { sides: ["Cascade", "Delta"], score: [0, 1] }, { sides: ["Aurora", "Delta"], score: [3, 1] }]);
const side: LayoutSide = layout.sides[0];
console.log(side.key, side.rows, side.boxes.length);l 1 1What it prints (run when this page was built)