Mixins / foldkit-mixins-ui

TimerView

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

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 labels?: Partial<TimerLabels> | undefined
  readonly style?: NamedStyle<typeof TimerSlots> | undefined
  readonly mixins?: MixinList<Message> | undefined
}

Members

TimerView.model

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

readonly model: Model

TimerView.onMessage

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

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:283

readonly label: string

What is timed, shown and naming the timer.

TimerView.units

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

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:287

readonly separator?: string | undefined

Drawn between units; default :.

TimerView.controls

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

readonly controls?: boolean | undefined

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

TimerView.labels

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

readonly labels?: Partial<TimerLabels> | undefined

TimerView.style

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

readonly style?: NamedStyle<typeof TimerSlots> | undefined

A style of TimerSlots, for the look.

TimerView.mixins

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

readonly mixins?: MixinList<Message> | undefined

Mixins beside the style.