aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-02-25 01:04:24 +0100
committerRobert Jaros <rjaros@finn.pl>2018-02-25 01:04:24 +0100
commit9a1effcf29b27cc2e60b927c2d737b6cad0289b7 (patch)
treecd47309106493f869a7d7d5e9a43dcc99969dd4c /src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
parentc64b2c4b1f0c4e0e0d94d202715db4aaa47d9c65 (diff)
downloadkvision-9a1effcf29b27cc2e60b927c2d737b6cad0289b7.tar.gz
kvision-9a1effcf29b27cc2e60b927c2d737b6cad0289b7.tar.bz2
kvision-9a1effcf29b27cc2e60b927c2d737b6cad0289b7.zip
Change enum classes names for better readability.
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
index 8d83ee51..de5bcd3b 100644
--- a/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
@@ -22,8 +22,8 @@
package pl.treksoft.kvision.modal
import pl.treksoft.kvision.core.Widget
-import pl.treksoft.kvision.html.ALIGN
-import pl.treksoft.kvision.html.BUTTONSTYLE
+import pl.treksoft.kvision.html.Align
+import pl.treksoft.kvision.html.ButtonStyle
import pl.treksoft.kvision.html.Button
import pl.treksoft.kvision.html.TAG
import pl.treksoft.kvision.html.Tag
@@ -43,7 +43,7 @@ import pl.treksoft.kvision.utils.ENTER_KEY
*/
open class Alert(
caption: String? = null, text: String? = null, rich: Boolean = false,
- align: ALIGN? = null, size: MODALSIZE? = null, animation: Boolean = true,
+ align: Align? = null, size: ModalSize? = null, animation: Boolean = true,
private val callback: (() -> Unit)? = null
) : Modal(caption, true, size, animation) {
@@ -76,7 +76,7 @@ open class Alert(
init {
body.add(content)
- val okButton = Button("OK", "ok", BUTTONSTYLE.PRIMARY)
+ val okButton = Button("OK", "ok", ButtonStyle.PRIMARY)
okButton.setEventListener {
click = {
hide()
@@ -112,7 +112,7 @@ open class Alert(
@Suppress("LongParameterList")
fun show(
caption: String? = null, text: String? = null, rich: Boolean = false,
- align: ALIGN? = null, size: MODALSIZE? = null, animation: Boolean = true,
+ align: Align? = null, size: ModalSize? = null, animation: Boolean = true,
callback: (() -> Unit)? = null
) {
Alert(caption, text, rich, align, size, animation, callback).show()