Skip to content

@jsvision/ui / StatusItem

Interface: StatusItem

Defined in: ui/src/status/status-item.ts:24

A status entry's readable contract: its (possibly live) label, the command it emits, and an optional accelerator. statusItem() returns a StatusItemView, which satisfies this type — so const entry: StatusItem = statusItem(...) types and entry.command reads.

Properties

command?

readonly optional command?: string

Defined in: ui/src/status/status-item.ts:28

The command emitted when clicked or when its accelerator is pressed; omitted ⇒ a passive label.


key?

readonly optional key?: string

Defined in: ui/src/status/status-item.ts:30

Optional accelerator label, e.g. 'Alt+X', 'Ctrl+Q', or 'F1'.


text

readonly text: string | (() => string)

Defined in: ui/src/status/status-item.ts:26

Display label, or a getter for a live one; ~X~ marks the accent character.