KyuubuMovesPropstype
The props of KyuubuMoves: every option of the list, and the box's className and style.
Import it
import type { KyuubuMovesProps } from "@johnmorrisdotca/kyuubu/react";
Definition
type KyuubuMovesProps = MoveListOptions & {
className?: string;
style?: CSSProperties;
ref?: Ref<MoveListHandle>;
};
Members
| Name | Type | Description |
|---|---|---|
groups | readonly MoveListGroup[] | The runs of moves, in order. |
current (optional) | number | null | undefined | The move just made, counted across every run from 0, or null for none. |
locale (optional) | KyuubuLanguage | undefined | English or Japanese: for the words of each move when none is given, and for the list's own name. The page's |
onPick (optional) | ((index: number, group: number, at: number) => void) | undefined | Called when a move is chosen, by a press or a key: its place counted across every run from 0, its run and its place in the run. |
label (optional) | string | undefined | What a screen reader calls the whole list. "The moves" in the list's language when left out. |
className (optional) | string | undefined | |
style (optional) | CSSProperties | undefined | |
ref (optional) | Ref<MoveListHandle> | undefined |
Examples
import type { KyuubuMovesProps } from "@johnmorrisdotca/kyuubu/react";
const value: KyuubuMovesProps = { groups: [{ label: "Solve", items: ["R", "R'"] }], current: 0 };
console.log(value.current);0What it prints (run when this page was built)