View Source PhoenixDuskmoon.Component.Flash (PhoenixDuskmoon v5.2.0-beta.3)
Summary
Functions
Renders flash notices.
Examples
<.dm_flash kind={:info} flash={@flash} />
<.dm_flash kind={:info} phx-mounted={show("#flash")}>Welcome Back!</.dm_flash>
Attributes
id
(:string
) - the optional id of flash container. Defaults to"flash"
.flash
(:map
) - the map of flash messages to display. Defaults to%{}
.title
(:string
) - Defaults tonil
.kind
(:atom
) - used for styling and flash lookup.Must be one of:info
, or:error
.autoshow
(:boolean
) - whether to auto show the flash on mount. Defaults totrue
.close
(:boolean
) - whether the flash can be closed. Defaults totrue
.- Global attributes are accepted. the arbitrary HTML attributes to add to the flash container.
Slots
inner_block
- the optional inner block that renders the flash message.
Shows the flash group with standard titles and content.
Examples
<.dm_flash_group flash={@flash} />
Attributes
flash
(:map
) (required) - the map of flash messages.