Try Install Learn Blog API Packages GitHub
Pages

Ui.Modal

A generic modal component.

States

content
:
Html
=
<></>

The content of the modal.

open
:
Bool
=
false

Wether or not the modal is open.

reject
:
Function(String, Void)
=
(error : String) { void }

The reject function.

resolve
:
Function(Void, Void)
=
(value : Void) { void }

The resolve function.

theme
:
Ui.Theme
=
Ui:DEFAULT_THEME

The theme.

transitionDuration
:
Number
=
240

The transition duration.

zIndex
:
Number
=
100

The z-index of the modal.

Functions

cancel
:
Promise(Never, Void)

Cancels the modal.

hide
:
Promise(Never, Void)

Hides the modal.

render
:
Html

Renders the modal.

show
(
content
:
Html
)
:
Promise(String, Void)

Shows the component with the given content.

showWithOptions
(
content
:
Html
zIndex
:
Number
transitionDuration
:
Number
theme
:
Ui.Theme
openCallback
:
Function(Promise(Never, Void))
)
:
Promise(String, Void)

Shows the component with the given content and z-index.