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/html | |
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/html')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/html/Button.kt | 13 | ||||
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/html/Tag.kt | 1 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/html/Button.kt b/src/main/kotlin/pl/treksoft/kvision/html/Button.kt index d10cb8cd..f0cb91f7 100644 --- a/src/main/kotlin/pl/treksoft/kvision/html/Button.kt +++ b/src/main/kotlin/pl/treksoft/kvision/html/Button.kt @@ -23,8 +23,8 @@ enum class BUTTONSIZE(val className: String) { } open class Button(text: String, icon: String? = null, style: BUTTONSTYLE = BUTTONSTYLE.DEFAULT, - size: BUTTONSIZE? = null, block: Boolean = false, disabled: Boolean = false, - image: ResString? = null, classes: Set<String> = setOf()) : Widget(classes) { + disabled: Boolean = false, image: ResString? = null, + classes: Set<String> = setOf()) : Widget(classes) { var text = text set(value) { field = value @@ -40,22 +40,23 @@ open class Button(text: String, icon: String? = null, style: BUTTONSTYLE = BUTTO field = value refresh() } - var size = size + var disabled = disabled set(value) { field = value refresh() } - var block = block + var image = image set(value) { field = value refresh() } - var disabled = disabled + + var size: BUTTONSIZE? = null set(value) { field = value refresh() } - var image = image + var block = false set(value) { field = value refresh() diff --git a/src/main/kotlin/pl/treksoft/kvision/html/Tag.kt b/src/main/kotlin/pl/treksoft/kvision/html/Tag.kt index da964f6e..70725d97 100644 --- a/src/main/kotlin/pl/treksoft/kvision/html/Tag.kt +++ b/src/main/kotlin/pl/treksoft/kvision/html/Tag.kt @@ -22,6 +22,7 @@ enum class TAG(val tagName: String) { UL("ul"), OL("ol"), DIV("div"), + LABEL("label"), MARK("mark"), DEL("del"), |