Alert Toast Component
This class combines the configuration and the core styling of an alert-toast (toast containing an alert as it's content).
You can configure the following aspects:
position of the toast: top | topLeft | topRight | bottom (default) | bottomLeft | bottomRight
duration: time in ms before the toast is automatically dismissed - default is 5000 ms
isCloseable : if true, a close button is added for closing the toast before the duration timer hits zero
closeButtonStyle: style of the toast's close button, if displayed
background: background color of the toast
alert : all properties of the underlying alert
See ToastComponent if you need to define custom content.
Example on how to configure a toast (with manually created content):
showToast {
status { warning }
position { bottomRight }
duration { 8000 }
alert {
title("Alert")
severity { info }
// ...
}
}Constructors
AlertToastComponent
Link copied to clipboard
fun AlertToastComponent()
Content copied to clipboard
Types
Companion
Link copied to clipboard
Functions
render
Link copied to clipboard
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 ToastComponentBase.Companion init block.
Properties
alert
Link copied to clipboard
background
Link copied to clipboard
closeButtonIcon
Link copied to clipboard
open override val closeButtonIcon: ComponentProperty<Icons.() -> IconDefinition>
Content copied to clipboard
closeButtonPrefix
Link copied to clipboard
closeButtonRendering
Link copied to clipboard
open override val closeButtonRendering: ComponentProperty<RenderContext.() -> DomListener<MouseEvent, HTMLElement>>
Content copied to clipboard
closeButtonStyle
Link copied to clipboard
open override val closeButtonStyle: ComponentProperty<Style<BasicParams>>
Content copied to clipboard
duration
Link copied to clipboard
hasCloseButton
Link copied to clipboard
placement
Link copied to clipboard
val placement: ComponentProperty<ToastComponentBase.Placement.() -> String>
Content copied to clipboard