Lobby
Waiting to be let into a call.
SourcePackage @weft-js/warp
Preview
tsx
import { state } from '@weft-js/core'import { Button, Lobby, Row, Text } from '@weft-js/warp'export function Waiting() { const waiting = state(true) return ( <> {waiting.value ? <Lobby title="Waiting for Sam Okafor" onCancel={() => (waiting.value = false)}>Sam is running the incident review. You'll get in as soon as they let you.</Lobby> : <Row gap="related"><Text subtle>Request cancelled.</Text><Button emphasis="outline" tone="neutral" size="sm" onClick={() => (waiting.value = true)}>Ask again</Button></Row>} </> )}Installation
npm install @weft-js/warpUsage
tsx
import { Lobby } from '@weft-js/warp'Accessibility
- "Asking to join" is a status, so it is read out without taking focus.
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
title | unknown | 'Waiting for the host' | The heading. |
children | unknown | "We'll chime when it's your turn." | What happens next. |
| Event | Type | Default | Description |
|---|---|---|---|
onCancel | (() => void) | — | Cancel request was pressed. |
RelatedPrejoinScheduled lobby