Corex. Flash. Error
(Corex v0.1.0)
View Source
Defaults for Phoenix :error flashes shown by toast_group/1.
| Field | Type | Role |
|---|---|---|
title | String.t() | Toast title; body text comes from the flash message |
type | :info | :success | :error | Zag toast type / styling |
duration | integer() | :infinity | Visible time in ms, or no auto-dismiss |
Example
<.toast_group
id="layout-toast"
class="toast"
flash={@flash}
flash_error={%Corex.Flash.Error{title: "Error", type: :error, duration: :infinity}}
>
<:loading>
<.heroicon name="hero-arrow-path" />
</:loading>
<:close>
<.heroicon name="hero-x-mark" />
</:close>
</.toast_group>