diff options
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt index 010f7cba..436ade22 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/FlexPanel.kt @@ -218,23 +218,21 @@ 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 - } - } +/** + * 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 } /** |