CloseMethodCompanion

open class CloseMethodCompanion

This class defines helpful methods to either close all currently open (closeAllToasts) or the last created toast (closeLastToast) which can be called via the companion objects of both ToastComponent and AlertToastComponent.

Example:

clickButton {
variant { outline }
text("closeAll")
} handledBy ToastComponent.closeAllToasts()

Constructors

CloseMethodCompanion
Link copied to clipboard
js
fun CloseMethodCompanion()

Functions

closeAllToasts
Link copied to clipboard
js
fun closeAllToasts(): SimpleHandler<Unit>
closeLastToast
Link copied to clipboard
js
fun closeLastToast(): SimpleHandler<Unit>

Inheritors

ToastComponentBase
Link copied to clipboard
ToastComponent
Link copied to clipboard
AlertToastComponent
Link copied to clipboard