DevactionUI.Callout (devaction_ui v0.1.0)

Copy Markdown View Source

A tinted block that says something to the reader: a note, what the AI did, a tip, a warning, a decision. Color is never alone: it always carries a title or an icon slot, and an :alert role when it is urgent.

kind is the canvas's name (:note, :ai, :tip, :warning, :decision) or a plain tone (:risk, :warn, :ok, :info, :neutral). With title, the title is bold on its own line; actions is a row for buttons under the body.

Summary

Functions

callout(assigns)

Attributes

  • kind (:atom) - Defaults to :note.
  • title (:string) - Defaults to nil.
  • role (:string) - alert for something urgent, status for a change the reader should hear. Defaults to nil.
  • class (:any) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)
  • icon - the icon, drawn by the caller in the tone of the callout.
  • actions