aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/panel
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/panel')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt
index 4a4f4086..e4e5dd47 100644
--- a/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt
@@ -244,6 +244,23 @@ open class FlexPanel(
}
return snstyle
}
+
+ companion object {
+ /**
+ * DSL builder extension function.
+ *
+ * It takes the same parameters as the constructor of the built component.
+ */
+ fun Container.flexPanel(
+ direction: FLEXDIR? = null, wrap: FLEXWRAP? = null, justify: FLEXJUSTIFY? = null,
+ alignItems: FLEXALIGNITEMS? = null, alignContent: FLEXALIGNCONTENT? = null,
+ spacing: Int? = null, classes: Set<String> = setOf(), init: (FlexPanel.() -> Unit)? = null
+ ): FlexPanel {
+ val flexPanel = FlexPanel(direction, wrap, justify, alignItems, alignContent, spacing, classes, init)
+ this.add(flexPanel)
+ return flexPanel
+ }
+ }
}
/**
@@ -275,21 +292,4 @@ internal class FlexWrapper(
}
return snstyle
}
-
- companion object {
- /**
- * DSL builder extension function.
- *
- * It takes the same parameters as the constructor of the built component.
- */
- fun Container.flexPanel(
- direction: FLEXDIR? = null, wrap: FLEXWRAP? = null, justify: FLEXJUSTIFY? = null,
- alignItems: FLEXALIGNITEMS? = null, alignContent: FLEXALIGNCONTENT? = null,
- spacing: Int? = null, classes: Set<String> = setOf(), init: (FlexPanel.() -> Unit)? = null
- ): FlexPanel {
- val flexPanel = FlexPanel(direction, wrap, justify, alignItems, alignContent, spacing, classes, init)
- this.add(flexPanel)
- return flexPanel
- }
- }
}