alert

fun RenderContext.alert(styling: BasicParams.() -> Unit = {}, baseClass: StyleClass = StyleClass.None, id: String? = null, prefix: String = "alert", build: AlertComponent.() -> Unit)

Creates an alert and renders it right away.

Parameters

baseClass

optional CSS class that should be applied to the toast element

build

a lambda expression for setting up the component itself

id

the ID of the toast element

prefix

the prefix for the generated CSS class of the toast element resulting in the form `$prefix-$hash`

styling

a lambda expression for declaring the styling of the toast using fritz2's styling DSL