Ask
An ask where it was posted: under the question's words, its choices, its otherwise line, and how it ended.
import { Ask } from "@arcadia/ui"TSX
Examples
- EnterSpace
- Presses a choice, or opens the field from Other
- Enter
- Sends the words in the field
- Esc
- Closes the field opened from Other
Ask
choices- readonly string[]Default []
- The answers it offers, in the asker's order, of equal weight. None: the field alone.
other- booleanDefault false
- "Other" after the choices opens one field for the person's own words. An ask with no choices always has the field.
otherwise- string
- What the asker does if nobody answers, in the asker's words: the line after "Otherwise". Every ask has one; leave it out only where the host already shows it (a list row's
sub). askedOfrequired- ReactNode
- The person it is put to: their name.
you- booleanDefault false
- The reader is that person: the choices press and the field takes words. Anyone else reads the choices as plain words, and "Asked of" names the person.
state- "open" | "waiting" | "answered" | "withdrawn" | "gone-on"Default "open"
answer- { readonly text: string; readonly at: ReactNode }
- With
answered: what the person gave, and when, in the kit's clock (fmtTime,fmtDayTime). onAnswer- (reply: AskReply) => void | Promise<unknown>
- A choice pressed or words sent. A promise keeps the pressed button busy until it settles.
error- ReactNode
- The answer did not land: what happened and what to do, under the choices (announced).
rootStyle- RootStyle
- Typed StyleX override: where the ask sits.
Rest props go to <div> props.