Usage
@prepared911/ui/blocks/call-status-card from its subpath. Load @prepared911/ui/styles.css once at the document root.state is the only input to the card's paint. It picks the wash and the edge, and the card never takes a wash, an accent edge or any color as a prop.| State | Wash | Edge |
|---|---|---|
IncomingEmergency | Destructive | Default |
IncomingNonEmergency | Informative | Default |
Connected | Accent | Default |
Held | None | Accent |
Idle | None | Default |
statusLabel is visible text in every state, so the wash and the edge never carry the state alone.queue is { queueClass, label }. The class picks the badge intent (Emergency destructive, NonEmergency informative, Other neutral); the label is the badge text. Pass the class from the call data, never one derived from the queue's name.device is { type, label }. The type picks the glyph (Mobile, Landline, Voip); Unknown draws none. The glyph is decorative and the label is read before the number.number and callerName are data. Pass a DisplayValue, or a LocalizedMessage for copy such as the idle text. Both truncate with the full value in the title.timer is { startedAt, elapsedLabel, now?, locale? }. In Held, pass the moment the hold began. The digits use the TextType.Timer role.footer takes the actions on a ringing call or the checks on a live one. The block lays the row out and never styles what it holds.