1681-engine / react / askChoice
Function: askChoice() ​
ts
function askChoice(
text,
options,
words?
): Promise<string | null>;Defined in: src/react/choiceStore.ts:27
Asks the player to pick one of options; resolves its id, or null when cancelled.
Parameters ​
| Parameter | Type |
|---|---|
text | ReactNode |
options | readonly ChoiceOption[] |
words | { cancel?: string; confirm?: string; } |
words.cancel? | string |
words.confirm? | string |
Returns ​
Promise<string | null>