DevactionUI.Stat (devaction_ui v0.1.0)

Copy Markdown View Source

A number with its name: the mono caption over a large value, optionally with a small trend tag beside it. highlight is the inverted version, white on ink, for the one number a screen is about. The value is the slot, so it can carry a unit (7<span>/12</span>).

Summary

Functions

stat(assigns)

Attributes

  • label (:string) (required)
  • tone (:atom) - Defaults to :default. Must be one of :default, :risk, :warn, or :ok.
  • highlight (:boolean) - Defaults to false.
  • class (:any) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required) - the value.
  • trend