diff options
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt | 10 |
1 files changed, 8 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 7639ca3b..755c675b 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/HPanel.kt @@ -32,11 +32,17 @@ package pl.treksoft.kvision.panel * @param alignItems flexbox items alignment * @param spacing spacing between columns/rows * @param classes a set of CSS class names + * @param init an initializer extension function */ open class HPanel( wrap: FLEXWRAP? = null, justify: FLEXJUSTIFY? = null, alignItems: FLEXALIGNITEMS? = null, spacing: Int? = null, - classes: Set<String> = setOf() + classes: Set<String> = setOf(), init: (HPanel.() -> Unit)? = null ) : FlexPanel( null, wrap, justify, alignItems, null, spacing, classes -) +) { + init { + @Suppress("LeakingThis") + init?.invoke(this) + } +} |