View Source LiveToast.Components (Live Toast v0.6.0)
This module defines the components used in the rendering of the default toast messages. You can use this as a reference to create your own version of these components.
Summary
Functions
Attributes
flash
(:map
) (required) - the map of flash messages.id
(:string
) - the optional id of flash container. Defaults to"toast-group"
.corner
(:atom
) - the corner to display the toasts. Defaults to:bottom_right
.toast_class_fn
(:any
) - function to override the look of the toasts. Defaults to&LiveToast.toast_class_fn/1
.
Attributes
f
(:map
) (required) - the map of flash messages.corner
(:atom
) - the corner to display the toasts. Defaults to:bottom_right
.toast_class_fn
(:any
) - function to override the look of the toasts. Defaults to&LiveToast.toast_class_fn/1
.
Attributes
id
(:string
) - the optional id of flash container.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
.target
(:any
) - the target for the phx-click event. Defaults tonil
.duration
(:integer
) - the time in milliseconds before the message is automatically dismissed. Defaults to6000
.class_fn
(:any
) (required) - function to override the look of the toasts.corner
(:atom
) (required) - the corner to display the toasts.icon
(:any
) - the optional icon to render in the flash message. Defaults tonil
.action
(:any
) - the optional action to render in the flash message. Defaults tonil
.component
(:any
) - the optional component to render the flash message. Defaults tonil
.- 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.
Functions
Attributes
flash
(:map
) (required) - the map of flash messages.id
(:string
) - the optional id of flash container. Defaults to"toast-group"
.corner
(:atom
) - the corner to display the toasts. Defaults to:bottom_right
.toast_class_fn
(:any
) - function to override the look of the toasts. Defaults to&LiveToast.toast_class_fn/1
.
Attributes
f
(:map
) (required) - the map of flash messages.corner
(:atom
) - the corner to display the toasts. Defaults to:bottom_right
.toast_class_fn
(:any
) - function to override the look of the toasts. Defaults to&LiveToast.toast_class_fn/1
.
Attributes
id
(:string
) - the optional id of flash container.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
.target
(:any
) - the target for the phx-click event. Defaults tonil
.duration
(:integer
) - the time in milliseconds before the message is automatically dismissed. Defaults to6000
.class_fn
(:any
) (required) - function to override the look of the toasts.corner
(:atom
) (required) - the corner to display the toasts.icon
(:any
) - the optional icon to render in the flash message. Defaults tonil
.action
(:any
) - the optional action to render in the flash message. Defaults tonil
.component
(:any
) - the optional component to render the flash message. Defaults tonil
.- 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.