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

27 lines
712 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
2022-01-12 13:58:52 +00:00
import dev.inmo.jsuikit.modifiers.UIKitModifier
import dev.inmo.jsuikit.modifiers.include
import org.jetbrains.compose.web.dom.AttrBuilderContext
2021-12-22 08:38:12 +00:00
import org.jetbrains.compose.web.dom.Progress
import org.w3c.dom.HTMLProgressElement
2021-12-22 08:38:12 +00:00
@Composable
fun Progress(
value: Int,
vararg modifiers: UIKitModifier,
max: Int = 100,
attributesCustomizer: AttrBuilderContext<HTMLProgressElement> = {}
2021-12-22 08:38:12 +00:00
) {
Progress(
{
classes("uk-progress")
include(*modifiers)
attr("max", max.toString())
attr("value", value.toString())
attributesCustomizer()
2021-12-22 08:38:12 +00:00
}
)
}