Reference · Draw a bracket, a table or a road to the final
NumberOnesOptionstype
What the number-ones board can be told: the columns, the card colours, and the options of every board.
Import it
import type { NumberOnesOptions } from "@johnmorrisdotca/taisen-brackets";
Definition
interface NumberOnesOptions extends BoardOptions, Shared {
columns?: number;
colors?: readonly string[];
}
Members
| Name | Type | Description |
|---|---|---|
columns (optional) | number | undefined | Columns of cards, 1 to 4. Default: the number that makes the cards biggest. |
colors (optional) | readonly string[] | undefined | The colour of each card's number panel, hex codes, taken in turn. The number is white or near-black, whichever reads on the colour. Default |
size (optional) | BoardSizeName | { width: number; height: number; } | undefined | One of |
theme (optional) | "auto" | "light" | "dark" | undefined |
|
flags (optional) | FlagRenderer | undefined | Draws a flag from its code, as for |
flagHref (optional) | ((code: string) => string | null | undefined) | undefined | The address of a flag as a picture to load, tried where |
flagShape (optional) | "round" | "square" | undefined |
|
locale (optional) | string | Locale | undefined | The language: |
words (optional) | Partial<Words> | undefined | |
title (optional) | string | undefined | The |
id (optional) | string | undefined | Prefix for the drawing's ids. Default: a hash of the state and the options. |
className (optional) | string | undefined | |
nameStyle (optional) | "surname-first" | "given-first" | "as-is" | undefined |
|
precision (optional) | number | undefined | Decimals for numeric points ( |
Examples
import { rankingNumberOnes, type NumberOnesOptions } from "@johnmorrisdotca/taisen-brackets";
const options: NumberOnesOptions = { size: "square", columns: 2, nameStyle: "given-first" };
console.log(rankingNumberOnes({ cards: [{ category: "-60 kg", entry: { name: { surname: "Nakamura", given: "Kenji" } } }] }, options).startsWith("<svg"));trueWhat it prints (run when this page was built)