Browse Source

Web: Add Hr Element (#741)

* Add Hr element

* Add Hr Tag

* Add missing HRElement import

* Remove the forbidden content
pull/751/head
Philip Wedemann 4 years ago committed by GitHub
parent
commit
21146ed1d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      web/core/src/jsMain/kotlin/androidx/compose/web/attributes/Attrs.kt
  2. 12
      web/core/src/jsMain/kotlin/androidx/compose/web/elements/Elements.kt

1
web/core/src/jsMain/kotlin/androidx/compose/web/attributes/Attrs.kt

@ -12,6 +12,7 @@ interface Tag {
object Option : Tag object Option : Tag
object OptGroup : Tag object OptGroup : Tag
object H : Tag object H : Tag
object Hr : Tag
object Ul : Tag object Ul : Tag
object Ol : Tag object Ol : Tag
object Li : Tag object Li : Tag

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

@ -22,6 +22,7 @@ import org.w3c.dom.HTMLDivElement
import org.w3c.dom.HTMLElement import org.w3c.dom.HTMLElement
import org.w3c.dom.HTMLFormElement import org.w3c.dom.HTMLFormElement
import org.w3c.dom.HTMLHeadingElement import org.w3c.dom.HTMLHeadingElement
import org.w3c.dom.HTMLHRElement
import org.w3c.dom.HTMLImageElement import org.w3c.dom.HTMLImageElement
import org.w3c.dom.HTMLInputElement import org.w3c.dom.HTMLInputElement
import org.w3c.dom.HTMLLIElement import org.w3c.dom.HTMLLIElement
@ -358,6 +359,17 @@ fun Footer(
) )
} }
@Composable
fun Hr(
attrs: AttrBuilderContext<Tag.Hr> = {}
) {
TagElement<Tag.Hr, HTMLHRElement>(
tagName = "hr",
applyAttrs = attrs,
content = null
)
}
@Composable @Composable
fun Label( fun Label(
forId: String? = null, forId: String? = null,

Loading…
Cancel
Save