mirror of
https://github.com/InsanusMokrassar/JSUIKitKBindings.git
synced 2025-11-13 18:40:29 +00:00
add attributes customizers lambdas to all elements and temporarily change signatures with modifiers from varargs to arrays
This commit is contained in:
@@ -4,7 +4,9 @@ import androidx.compose.runtime.*
|
||||
import dev.inmo.jsuikit.modifiers.UIKitModifier
|
||||
import dev.inmo.jsuikit.modifiers.include
|
||||
import org.jetbrains.compose.web.attributes.*
|
||||
import org.jetbrains.compose.web.dom.AttrBuilderContext
|
||||
import org.jetbrains.compose.web.dom.Input
|
||||
import org.w3c.dom.HTMLInputElement
|
||||
|
||||
@Composable
|
||||
fun <T> TextField(
|
||||
@@ -12,7 +14,8 @@ fun <T> TextField(
|
||||
state: MutableState<T>,
|
||||
disabledState: State<Boolean>? = null,
|
||||
placeholder: String? = null,
|
||||
vararg modifiers: UIKitModifier
|
||||
attributesCustomizer: AttrBuilderContext<HTMLInputElement> = {},
|
||||
modifiers: Array<UIKitModifier> = emptyArray()
|
||||
) {
|
||||
Input(type) {
|
||||
classes("uk-input")
|
||||
@@ -26,5 +29,6 @@ fun <T> TextField(
|
||||
disabled()
|
||||
}
|
||||
}
|
||||
attributesCustomizer()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user