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
|
2022-03-06 10:18:21 +00:00
|
|
|
import dev.inmo.jsuikit.modifiers.UIKitLabel
|
|
|
|
import dev.inmo.jsuikit.modifiers.include
|
2022-01-25 06:39:09 +00:00
|
|
|
import dev.inmo.jsuikit.utils.Attrs
|
2022-03-06 10:18:21 +00:00
|
|
|
import org.jetbrains.compose.web.dom.Span
|
|
|
|
import org.jetbrains.compose.web.dom.Text
|
2022-01-13 05:55:08 +00:00
|
|
|
import org.w3c.dom.HTMLSpanElement
|
2021-12-22 08:38:12 +00:00
|
|
|
|
2022-01-25 06:39:09 +00:00
|
|
|
@Composable
|
|
|
|
fun Label(
|
|
|
|
text: String,
|
|
|
|
attrs: Attrs<HTMLSpanElement>
|
|
|
|
) = Span(
|
|
|
|
{
|
|
|
|
include(UIKitLabel)
|
|
|
|
attrs.builder(this)
|
2021-12-22 08:38:12 +00:00
|
|
|
}
|
2022-01-25 06:39:09 +00:00
|
|
|
) {
|
|
|
|
Text(text)
|
2021-12-22 08:38:12 +00:00
|
|
|
}
|