show Alert Toast
fun showAlertToast( styling: BasicParams.() -> Unit = {}, baseClass: StyleClass = StyleClass.None, id: String? = null, prefix: String = "toast-alert", build: AlertToastComponent.() -> Unit)
Content copied to clipboard
This factory method creates a toast with an alert as its content and displays it right away. Use alertToast in order to display a toast delayed, e.g. when a button is pressed.
Usage example:
showAlertToast {
// configuration of the toast:
duration(9000)
position { bottomRight }
// configuration of the alert:
alert {
title("AlertToast!")
content("This is an alert in a toast.")
}
}Content copied to clipboard
Parameters
styling
lambda expression for declaring the styling of the toast using fritz2's styling DSL
base Class
optional CSS class that should be applied to the toast element
id
ID of the toast element
prefix
prefix for the generated CSS class of the toast element resulting in the form `$prefix-$hash`
build
a lambda expression for setting up the component itself.