Browse Source

Label content is specialized as HTMLLabelElement

pull/779/head
Shagen Ogandzhanian 4 years ago
parent
commit
d38dcbe8a2
  1. 3
      web/core/src/jsMain/kotlin/androidx/compose/web/elements/Base.kt
  2. 5
      web/core/src/jsMain/kotlin/androidx/compose/web/elements/Elements.kt

3
web/core/src/jsMain/kotlin/androidx/compose/web/elements/Base.kt

@ -28,6 +28,7 @@ import org.w3c.dom.HTMLHeadingElement
import org.w3c.dom.HTMLImageElement
import org.w3c.dom.HTMLInputElement
import org.w3c.dom.HTMLLIElement
import org.w3c.dom.HTMLLabelElement
import org.w3c.dom.HTMLOListElement
import org.w3c.dom.HTMLOptGroupElement
import org.w3c.dom.HTMLOptionElement
@ -133,7 +134,7 @@ interface ElementBuilder<TElement : Element> {
val Main: ElementBuilder<HTMLElement> = ElementBuilderImplementation("main")
val Footer: ElementBuilder<HTMLElement> = ElementBuilderImplementation("footer")
val Hr: ElementBuilder<HTMLHRElement> = ElementBuilderImplementation("hr")
val Label: ElementBuilder<HTMLElement> = ElementBuilderImplementation("label")
val Label: ElementBuilder<HTMLLabelElement> = ElementBuilderImplementation("label")
val Table: ElementBuilder<HTMLTableElement> = ElementBuilderImplementation("table")
val Caption: ElementBuilder<HTMLTableCaptionElement> = ElementBuilderImplementation("caption")
val Col: ElementBuilder<HTMLTableColElement> = ElementBuilderImplementation("col")

5
web/core/src/jsMain/kotlin/androidx/compose/web/elements/Elements.kt

@ -27,6 +27,7 @@ import org.w3c.dom.HTMLHRElement
import org.w3c.dom.HTMLImageElement
import org.w3c.dom.HTMLInputElement
import org.w3c.dom.HTMLLIElement
import org.w3c.dom.HTMLLabelElement
import org.w3c.dom.HTMLOListElement
import org.w3c.dom.HTMLOptGroupElement
import org.w3c.dom.HTMLOptionElement
@ -371,9 +372,9 @@ fun Hr(
fun Label(
forId: String? = null,
attrs: AttrBuilderContext<Tag.Label> = {},
content: ContentBuilder<HTMLElement>? = null
content: ContentBuilder<HTMLLabelElement>? = null
) {
TagElement<Tag.Label, HTMLElement>(
TagElement<Tag.Label, HTMLLabelElement>(
elementBuilder = ElementBuilder.Label,
applyAttrs = {
forId(forId)

Loading…
Cancel
Save