mirror of
https://github.com/InsanusMokrassar/JSUIKitKBindings.git
synced 2025-11-14 19:10:24 +00:00
add DropAre, UIKitPlaceholder and UIKitForm#Custom now have nullable target
This commit is contained in:
24
src/jsMain/kotlin/dev/inmo/jsuikit/elements/DropArea.kt
Normal file
24
src/jsMain/kotlin/dev/inmo/jsuikit/elements/DropArea.kt
Normal file
@@ -0,0 +1,24 @@
|
||||
package dev.inmo.jsuikit.elements
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import dev.inmo.jsuikit.modifiers.*
|
||||
import dev.inmo.jsuikit.utils.Attrs
|
||||
import org.jetbrains.compose.web.attributes.InputType
|
||||
import org.jetbrains.compose.web.dom.*
|
||||
import org.w3c.dom.HTMLDivElement
|
||||
import org.w3c.dom.HTMLInputElement
|
||||
|
||||
@Composable
|
||||
fun DropArea(
|
||||
attrs: Attrs<HTMLDivElement> = Attrs.empty(),
|
||||
inputAttrs: Attrs<HTMLInputElement> = Attrs.empty(),
|
||||
contentBuilder: ContentBuilder<HTMLDivElement> = {}
|
||||
) = Div(
|
||||
{
|
||||
include(UIKitPlaceholder, UIKitForm.Custom())
|
||||
attrs.builder(this)
|
||||
}
|
||||
) {
|
||||
Input(InputType.File, attrs = { inputAttrs.builder.invoke(this) })
|
||||
contentBuilder(this)
|
||||
}
|
||||
Reference in New Issue
Block a user