package dev.inmo.jsuikit.elements import androidx.compose.runtime.* import dev.inmo.jsuikit.modifers.UIKitModifier import dev.inmo.jsuikit.modifers.include import org.jetbrains.compose.web.attributes.* import org.jetbrains.compose.web.dom.Input @Composable fun TextField( type: InputType, state: MutableState, disabledState: State? = null, placeholder: String? = null, vararg modifiers: UIKitModifier ) { Input(type) { classes("uk-input") include(*modifiers) placeholder ?.let(::placeholder) onChange { state.value = it.value } disabledState ?.let { if (it.value) { disabled() } } } }