diff options
author | Robert Jaros <rjaros@finn.pl> | 2017-10-19 12:04:37 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2017-10-19 12:04:37 +0200 |
commit | 3ef71f681eeb1a832bbd0f95d01958617529bae7 (patch) | |
tree | 7ed5dae4696f24c1a527013ad42b6a5268558ead /src/main/kotlin/pl/treksoft/kvision/dropdown | |
parent | daa6f55e70e85c15c55ef06fd2912d95ea4922fc (diff) | |
download | kvision-3ef71f681eeb1a832bbd0f95d01958617529bae7.tar.gz kvision-3ef71f681eeb1a832bbd0f95d01958617529bae7.tar.bz2 kvision-3ef71f681eeb1a832bbd0f95d01958617529bae7.zip |
Refactoring styled component
Form controls: input, password, checkbox
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/dropdown')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt b/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt index b145f721..92f06591 100644 --- a/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt +++ b/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt @@ -4,7 +4,6 @@ import com.github.snabbdom.VNode import pl.treksoft.kvision.core.Container import pl.treksoft.kvision.core.ResString import pl.treksoft.kvision.core.Widget -import pl.treksoft.kvision.html.BUTTONSIZE import pl.treksoft.kvision.html.BUTTONSTYLE import pl.treksoft.kvision.html.Button import pl.treksoft.kvision.html.LIST @@ -23,8 +22,7 @@ enum class DD(val type: String) { } open class DropDown(text: String, elements: List<StringPair>? = null, icon: String? = null, - style: BUTTONSTYLE = BUTTONSTYLE.DEFAULT, size: BUTTONSIZE? = null, - block: Boolean = false, disabled: Boolean = false, image: ResString? = null, + style: BUTTONSTYLE = BUTTONSTYLE.DEFAULT, disabled: Boolean = false, image: ResString? = null, dropup: Boolean = false, classes: Set<String> = setOf()) : Container(classes) { var text get() = button.text @@ -73,7 +71,7 @@ open class DropDown(text: String, elements: List<StringPair>? = null, icon: Stri } private val idc = "kv_dropdown_" + counter - internal val button: DropDownButton = DropDownButton(idc, text, icon, style, size, block, + internal val button: DropDownButton = DropDownButton(idc, text, icon, style, disabled, image, setOf("dropdown")) internal val list: DropDownListTag = DropDownListTag(idc, setOf("dropdown-menu")) @@ -165,9 +163,9 @@ open class DropDown(text: String, elements: List<StringPair>? = null, icon: Stri } open class DropDownButton(id: String, text: String, icon: String? = null, style: BUTTONSTYLE = BUTTONSTYLE.DEFAULT, - size: BUTTONSIZE? = null, block: Boolean = false, disabled: Boolean = false, + disabled: Boolean = false, image: ResString? = null, classes: Set<String> = setOf()) : - Button(text, icon, style, size, block, disabled, image, classes) { + Button(text, icon, style, disabled, image, classes) { init { this.id = id |