aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.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/HPanel.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/HPanel.kt')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt
index ccc77b0f..88c95b92 100644
--- a/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt
@@ -22,6 +22,7 @@
package pl.treksoft.kvision.panel
import pl.treksoft.kvision.core.Container
+import pl.treksoft.kvision.utils.set
/**
* The container with horizontal layout.
@@ -59,10 +60,11 @@ fun Container.hPanel(
justify: FlexJustify? = null,
alignItems: FlexAlignItems? = null,
spacing: Int? = null,
- classes: Set<String> = setOf(),
+ classes: Set<String>? = null,
+ className: String? = null,
init: (HPanel.() -> Unit)? = null
): HPanel {
- val hpanel = HPanel(wrap, justify, alignItems, spacing, classes, init)
+ val hpanel = HPanel(wrap, justify, alignItems, spacing, classes ?: className.set, init)
this.add(hpanel)
return hpanel
}