MdDialog

open class MdDialog(returnValue: String? = null, type: DialogType? = null, className: String? = null, init: MdDialog.() -> Unit? = null) : MdWidget, HasActionsSlot, HasContentSlot, HasHeadlineSlot, HasIconSlot

Dialogs provide important prompts in a user flow.

See https://material-web.dev/components/dialog/

Author

Maanrifa Bacar Ali

Constructors

Link copied to clipboard
constructor(returnValue: String? = null, type: DialogType? = null, className: String? = null, init: MdDialog.() -> Unit? = null)

Properties

Link copied to clipboard
var closeAnimation: <Error class: unknown class>

Gets the closing animation for a dialog. Set to a new function to customize the animation.

Link copied to clipboard

Indicates that the dialog is in an open state.

Link copied to clipboard
var openAnimation: <Error class: unknown class>

Gets the opening animation for a dialog. Set to a new function to customize the animation.

Link copied to clipboard
open var parent: <Error class: unknown class>?
Link copied to clipboard
var returnValue: <Error class: unknown class>

Gets or sets the dialog's return value, usually to indicate which button a user pressed to close it.

Link copied to clipboard
var type: <Error class: unknown class>

The type of dialog for accessibility. Set this to alert to announce a dialog as an alert dialog.

Functions

Link copied to clipboard
open override fun actions(component: <Error class: unknown class>?)

Sets the headline of the dialog.

Link copied to clipboard
open fun afterCreate(node: <Error class: unknown class>)
Link copied to clipboard
open fun buildAttributeSet(attributeSetBuilder: <Error class: unknown class>)
Link copied to clipboard
fun close(returnValue: String? = this.returnValue): <Error class: unknown class><Unit>

Closes the dialog and fires a cancelable close event. After a dialog's animation, a closed event is fired.

Link copied to clipboard
open override fun content(component: <Error class: unknown class>?)

Sets the content of the dialog.

Link copied to clipboard
fun HasContentSlot.content(text: String): <Error class: unknown class>

Sets the text to the content slot.

Link copied to clipboard
open fun dispose()
Link copied to clipboard
open override fun headline(component: <Error class: unknown class>?)

Sets the actions of the dialog.

Link copied to clipboard
fun HasHeadlineSlot.headline(text: String): <Error class: unknown class>

Sets the text to the headline slot.

Link copied to clipboard
open override fun icon(component: <Error class: unknown class>?)

Sets the icon of the dialog.

Link copied to clipboard

Sets the icon identified by name to the icon slot.

Link copied to clipboard
fun open(): <Error class: unknown class><Unit>

Opens the dialog and fires a cancelable open event. After a dialog's animation, an opened event is fired. Add an autocomplete attribute to a child of the dialog that should receive focus after opening.

Link copied to clipboard
open fun render(): <Error class: unknown class>