aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/form/FieldLabel.kt
blob: a28245d6635e2e74d3afbf18299fcc2bc82ca59a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package pl.treksoft.kvision.form

import pl.treksoft.kvision.html.TAG
import pl.treksoft.kvision.html.Tag
import pl.treksoft.kvision.snabbdom.StringPair

open class FieldLabel(
    internal 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)
    }

}