aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2020-05-09 23:53:57 +0200
committerRobert Jaros <rjaros@finn.pl>2020-05-09 23:53:57 +0200
commit134cb687c4e05fd81a03b682505f9fb9d741a8d7 (patch)
treef9f41f28c01dc29d1d4fdd576cc9b21958fd9c3b /src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt
parent4a2aa49e0e561c1bc25aa962449fa2fcce9207ba (diff)
downloadkvision-134cb687c4e05fd81a03b682505f9fb9d741a8d7.tar.gz
kvision-134cb687c4e05fd81a03b682505f9fb9d741a8d7.tar.bz2
kvision-134cb687c4e05fd81a03b682505f9fb9d741a8d7.zip
Add new className parameter to all DSL builder functions.
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt
index c7f4b3ac..f838e85c 100644
--- a/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt
@@ -30,6 +30,7 @@ import pl.treksoft.kvision.core.UNIT
import pl.treksoft.kvision.html.TAG
import pl.treksoft.kvision.html.Tag
import pl.treksoft.kvision.utils.obj
+import pl.treksoft.kvision.utils.set
/**
* Split panel direction.
@@ -107,9 +108,11 @@ open class SplitPanel(
*/
fun Container.splitPanel(
direction: Direction = Direction.VERTICAL,
- classes: Set<String> = setOf(), init: (SplitPanel.() -> Unit)? = null
+ classes: Set<String>? = null,
+ className: String? = null,
+ init: (SplitPanel.() -> Unit)? = null
): SplitPanel {
- val splitPanel = SplitPanel(direction, classes, init)
+ val splitPanel = SplitPanel(direction, classes ?: className.set, init)
this.add(splitPanel)
return splitPanel
}