mirror of
https://github.com/InsanusMokrassar/JSUIKitKBindings.git
synced 2025-12-06 14:25:44 +00:00
add attributes customizers lambdas to all elements and temporarily change signatures with modifiers from varargs to arrays
This commit is contained in:
@@ -3,13 +3,16 @@ package dev.inmo.jsuikit.elements
|
||||
import androidx.compose.runtime.Composable
|
||||
import dev.inmo.jsuikit.modifiers.UIKitModifier
|
||||
import dev.inmo.jsuikit.modifiers.include
|
||||
import org.jetbrains.compose.web.dom.AttrBuilderContext
|
||||
import org.jetbrains.compose.web.dom.Progress
|
||||
import org.w3c.dom.HTMLProgressElement
|
||||
|
||||
@Composable
|
||||
fun Progress(
|
||||
value: Int,
|
||||
vararg modifiers: UIKitModifier,
|
||||
max: Int = 100
|
||||
modifiers: Array<UIKitModifier> = emptyArray(),
|
||||
max: Int = 100,
|
||||
attributesCustomizer: AttrBuilderContext<HTMLProgressElement> = {}
|
||||
) {
|
||||
Progress(
|
||||
{
|
||||
@@ -17,6 +20,7 @@ fun Progress(
|
||||
include(*modifiers)
|
||||
attr("max", max.toString())
|
||||
attr("value", value.toString())
|
||||
attributesCustomizer()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user