render

open override fun render(styling: BoxParams.() -> Unit, baseClass: StyleClass, id: String?, prefix: String)

This method registers one toast at the central toast store and creates a rendering expression that will be executed by the central rendering in the companion's object ToastComponent.Companion init block.

Parameters

baseClass

optional CSS class that should be applied to the toast element

id

ID of the toast element, a unique id will be generated if no ID is specified

prefix

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

styling

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