Corex.Toast.Translation (Corex v0.1.0-rc.1)

View Source

Default titles for flash-driven toasts on Corex.Toast.

Pass translation={%Corex.Toast.Translation{}} to override any field. Omitted fields use gettext defaults (see table).

FieldDefaultUsed for
infoInfoDefault title for :info flash toasts
errorErrorDefault title for :error flash toasts

Partial override example:

translation={%Corex.Toast.Translation{
  info: Corex.Gettext.gettext("Notice"),
  error: Corex.Gettext.gettext("Something went wrong")
}}

Summary

Types

t()

@type t() :: %Corex.Toast.Translation{error: String.t(), info: String.t()}

Functions

resolve(partial)