PathLogs UI
Русский

Components

LiveIndicator

Live connection state as a dot and a caption.

Live connection state as a dot and a caption. It usually sits next to the heading of a screen that refreshes itself.

Example

обновлено в 09:05подключаемся…нет связи — обновления приостановлены

Not colour alone

This is why offline is captioned not simply «no connection» but «updates are paused»: what matters to the user is the consequence, not the diagnosis.

Props

status*"connecting" | "live" | "offline"

The connection state. Comes from useEventStream.

updatedAtDate | null

When a change was last applied.

localestring

The locale for the time. Defaults to the browser's locale.

labels{ live?, connecting?, offline?, updated?, tipLive?, tipOffline? }

Captions. {time} is substituted inside updated.

tsx
labels={{ updated: "updated at {time}" }}
// → «updated at 2:32 PM»