diff options
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt index 8b46ae0b..c7f4b3ac 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt @@ -98,22 +98,20 @@ open class SplitPanel( arrayOf() } } +} - companion object { - /** - * DSL builder extension function. - * - * It takes the same parameters as the constructor of the built component. - */ - fun Container.splitPanel( - direction: Direction = Direction.VERTICAL, - classes: Set<String> = setOf(), init: (SplitPanel.() -> Unit)? = null - ): SplitPanel { - val splitPanel = SplitPanel(direction, classes, init) - this.add(splitPanel) - return splitPanel - } - } +/** + * DSL builder extension function. + * + * It takes the same parameters as the constructor of the built component. + */ +fun Container.splitPanel( + direction: Direction = Direction.VERTICAL, + classes: Set<String> = setOf(), init: (SplitPanel.() -> Unit)? = null +): SplitPanel { + val splitPanel = SplitPanel(direction, classes, init) + this.add(splitPanel) + return splitPanel } internal class Splitter(private val splitPanel: SplitPanel, direction: Direction) : Tag( |