MingaEditor.UI.Notification.Action (Minga v0.1.0)

Copy Markdown View Source

Inline action shown on a GUI notification.

The action id is the stable wire value sent back by native frontends. The optional dispatch value tells the BEAM how to route the click.

Summary

Types

BEAM-side routing target for a notification action.

t()

Functions

Builds an action from attrs, normalizing ids and labels to strings.

Types

dispatch()

@type dispatch() :: {:command, atom()} | {:event, atom(), term()} | nil

BEAM-side routing target for a notification action.

t()

@type t() :: %MingaEditor.UI.Notification.Action{
  dispatch: dispatch(),
  id: String.t(),
  label: String.t()
}

Functions

new(attrs)

@spec new(keyword() | map()) :: t()

Builds an action from attrs, normalizing ids and labels to strings.