asAlert

fun ComponentValidationMessage.asAlert(renderContext: RenderContext, size: FormSizes.() -> Style<BasicParams> = { normal }, stacking: AlertStacking.() -> Style<BasicParams> = { separated })

Convenience extension to display a ComponentValidationMessage as an alert. The alert's severity and content are determined from the validation message's properties.

Parameters

renderContext

RenderContext to render the alert in.

size

Optional property for the text and icon size.

stacking

Optional property for the margins around one alert.