kjsuikit/src/jsMain/kotlin/dev/inmo/jsuikit/elements/Labels.kt

23 lines
495 B
Kotlin
Raw Normal View History

2022-01-12 10:27:49 +00:00
package dev.inmo.jsuikit.elements
2021-12-22 08:38:12 +00:00
import androidx.compose.runtime.Composable
import dev.inmo.jsuikit.modifiers.UIKitLabel
import dev.inmo.jsuikit.modifiers.include
import dev.inmo.jsuikit.utils.Attrs
import org.jetbrains.compose.web.dom.Span
import org.jetbrains.compose.web.dom.Text
import org.w3c.dom.HTMLSpanElement
2021-12-22 08:38:12 +00:00
@Composable
fun Label(
text: String,
attrs: Attrs<HTMLSpanElement>
) = Span(
{
include(UIKitLabel)
attrs.builder(this)
2021-12-22 08:38:12 +00:00
}
) {
Text(text)
2021-12-22 08:38:12 +00:00
}