asAlert

fun ComponentValidationMessage.asAlert(styling: BasicParams.() -> Unit = { }, renderContext: RenderContext, build: AlertComponent.() -> Unit = { })

Convenience extension to display a ComponentValidationMessage as an alert. The alert's severity and content are determined from the validation message's properties. Custom styling via the styling parameter is optionally supported, as well as any other customization via the build-lambda.

Parameters

renderContext

RenderContext to render the alert in

styling

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

build

a lambda expression for setting up the component itself

fun ComponentValidationMessage.asAlert(renderContext: RenderContext, build: AlertComponent.() -> Unit = { })

Convenience extension to display a ComponentValidationMessage as an alert. The alert's severity and content are determined from the validation message's properties. Customization of the underlying AlertComponent is supported via the build-lambda. Custom styling can be applyied via the overloaded ComponentValidationMessage.asAlert method.

Parameters

renderContext

RenderContext to render the alert in

build

a lambda expression for setting up the component itself