aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/form/FieldLabel.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/form/FieldLabel.kt')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/FieldLabel.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/FieldLabel.kt b/src/main/kotlin/pl/treksoft/kvision/form/FieldLabel.kt
index 92b014d4..748ace83 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/FieldLabel.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/FieldLabel.kt
@@ -4,8 +4,9 @@ import pl.treksoft.kvision.html.TAG
import pl.treksoft.kvision.html.Tag
import pl.treksoft.kvision.snabbdom.StringPair
-open class FieldLabel(private val forId: String, text: String? = null, rich: Boolean = false) : Tag(TAG.LABEL,
- text, rich) {
+open class FieldLabel(private val forId: String, text: String? = null, rich: Boolean = false,
+ classes: Set<String> = setOf("control-label")) : Tag(TAG.LABEL,
+ text, rich, classes = classes) {
override fun getSnAttrs(): List<StringPair> {
return super.getSnAttrs() + ("for" to forId)