Mixins / foldkit-mixins-ui

TimerView

interface · packages/mixins-ui/src/timer.ts:281

interface TimerView<Message> {
  readonly model: Model
  readonly onMessage: (message: typeof Message.Type) => NoInfer<Message>
  readonly label: string
  readonly units?: ReadonlyArray<Unit> | undefined
  readonly separator?: string | undefined
  readonly controls?: boolean | undefined
  readonly words?: Partial<TimerWords> | undefined
  readonly style?: NamedStyle<typeof TimerSlots> | undefined
  readonly mixins?: MixinList<Message> | undefined
}

Members

TimerView.model

property · packages/mixins-ui/src/timer.ts:282

readonly model: Model

TimerView.onMessage

property · packages/mixins-ui/src/timer.ts:284

readonly onMessage: (message: typeof Message.Type) => NoInfer<Message>

Lifts the timer's own Messages into the application's.

TimerView.label

property · packages/mixins-ui/src/timer.ts:286

readonly label: string

What is timed, shown and naming the timer.

TimerView.units

property · packages/mixins-ui/src/timer.ts:288

readonly units?: ReadonlyArray<Unit> | undefined

The units shown, in any order; default hours, minutes and seconds.

TimerView.separator

property · packages/mixins-ui/src/timer.ts:290

readonly separator?: string | undefined

Drawn between units; default :.

TimerView.controls

property · packages/mixins-ui/src/timer.ts:292

readonly controls?: boolean | undefined

Draws the presses; default true. Without them, the application sends Pressed itself.

TimerView.words

property · packages/mixins-ui/src/timer.ts:293

readonly words?: Partial<TimerWords> | undefined

TimerView.style

property · packages/mixins-ui/src/timer.ts:295

readonly style?: NamedStyle<typeof TimerSlots> | undefined

A style of TimerSlots, for the look.

TimerView.mixins

property · packages/mixins-ui/src/timer.ts:297

readonly mixins?: MixinList<Message> | undefined

Mixins beside the style.