Browse Source

Add support of dl, dt and dd (#1922)

redirect
InsanusMokrassar 3 years ago committed by GitHub
parent
commit
22da8d9529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 41
      web/core/src/jsMain/kotlin/org/jetbrains/compose/web/elements/Elements.kt

41
web/core/src/jsMain/kotlin/org/jetbrains/compose/web/elements/Elements.kt

@ -19,6 +19,7 @@ import org.w3c.dom.HTMLBRElement
import org.w3c.dom.HTMLButtonElement
import org.w3c.dom.HTMLCanvasElement
import org.w3c.dom.HTMLDataListElement
import org.w3c.dom.HTMLDListElement
import org.w3c.dom.HTMLDivElement
import org.w3c.dom.HTMLElement
import org.w3c.dom.HTMLEmbedElement
@ -96,6 +97,10 @@ private val Picture: ElementBuilder<HTMLPictureElement> = ElementBuilderImplemen
private val Source: ElementBuilder<HTMLSourceElement> = ElementBuilderImplementation("source")
private val Canvas: ElementBuilder<HTMLCanvasElement> = ElementBuilderImplementation("canvas")
private val DList: ElementBuilder<HTMLDListElement> = ElementBuilderImplementation("dl")
private val DTerm: ElementBuilder<HTMLElement> = ElementBuilderImplementation("dt")
private val DDescription: ElementBuilder<HTMLElement> = ElementBuilderImplementation("dd")
private val Div: ElementBuilder<HTMLDivElement> = ElementBuilderImplementation("div")
private val A: ElementBuilder<HTMLAnchorElement> = ElementBuilderImplementation("a")
private val Input: ElementBuilder<HTMLInputElement> = ElementBuilderImplementation("input")
@ -434,6 +439,42 @@ fun Canvas(
)
}
@Composable
fun DList(
attrs: AttrBuilderContext<HTMLDListElement>? = null,
content: ContentBuilder<HTMLDListElement>? = null
) {
TagElement(
elementBuilder = DList,
applyAttrs = attrs,
content = content
)
}
@Composable
fun DDescription(
attrs: AttrBuilderContext<HTMLElement>? = null,
content: ContentBuilder<HTMLElement>? = null
) {
TagElement(
elementBuilder = DDescription,
applyAttrs = attrs,
content = content
)
}
@Composable
fun DTerm(
attrs: AttrBuilderContext<HTMLElement>? = null,
content: ContentBuilder<HTMLElement>? = null
) {
TagElement(
elementBuilder = DTerm,
applyAttrs = attrs,
content = content
)
}
@OptIn(ComposeWebInternalApi::class)
@Composable
fun Text(value: String) {

Loading…
Cancel
Save