aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
index 90766854..05550f34 100644
--- a/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
@@ -6,11 +6,13 @@ import pl.treksoft.kvision.html.Button
import pl.treksoft.kvision.html.TAG
import pl.treksoft.kvision.html.Tag
-open class Confirm(caption: String? = null, text: String? = null, rich: Boolean = false,
- align: ALIGN? = null, size: MODALSIZE? = null, animation: Boolean = true,
- cancelVisible: Boolean = false,
- private val noCallback: (() -> Unit)? = null,
- private val yesCallback: (() -> Unit)? = null) : Modal(caption, false, size, animation, false) {
+open class Confirm(
+ caption: String? = null, text: String? = null, rich: Boolean = false,
+ align: ALIGN? = null, size: MODALSIZE? = null, animation: Boolean = true,
+ cancelVisible: Boolean = false,
+ private val noCallback: (() -> Unit)? = null,
+ private val yesCallback: (() -> Unit)? = null
+) : Modal(caption, false, size, animation, false) {
var text
get() = content.text
set(value) {
@@ -74,10 +76,12 @@ open class Confirm(caption: String? = null, text: String? = null, rich: Boolean
companion object {
@Suppress("LongParameterList")
- fun show(caption: String? = null, text: String? = null, rich: Boolean = false,
- align: ALIGN? = null, size: MODALSIZE? = null, animation: Boolean = true,
- cancelVisible: Boolean = false,
- noCallback: (() -> Unit)? = null, yesCallback: (() -> Unit)? = null) {
+ fun show(
+ caption: String? = null, text: String? = null, rich: Boolean = false,
+ align: ALIGN? = null, size: MODALSIZE? = null, animation: Boolean = true,
+ cancelVisible: Boolean = false,
+ noCallback: (() -> Unit)? = null, yesCallback: (() -> Unit)? = null
+ ) {
Confirm(caption, text, rich, align, size, animation, cancelVisible, noCallback, yesCallback).show()
}
}