mirror of
https://github.com/InsanusMokrassar/JSUIKitKBindings.git
synced 2025-12-06 06:15:41 +00:00
fixes in DropAre and new type of attrs
This commit is contained in:
@@ -3,6 +3,7 @@ package dev.inmo.jsuikit.elements
|
||||
import androidx.compose.runtime.Composable
|
||||
import dev.inmo.jsuikit.modifiers.*
|
||||
import dev.inmo.jsuikit.utils.Attrs
|
||||
import dev.inmo.jsuikit.utils.InputAttrs
|
||||
import org.jetbrains.compose.web.attributes.InputType
|
||||
import org.jetbrains.compose.web.dom.*
|
||||
import org.w3c.dom.HTMLDivElement
|
||||
@@ -11,7 +12,7 @@ import org.w3c.dom.HTMLInputElement
|
||||
@Composable
|
||||
fun DropArea(
|
||||
attrs: Attrs<HTMLDivElement> = Attrs.empty(),
|
||||
inputAttrs: Attrs<HTMLInputElement> = Attrs.empty(),
|
||||
inputAttrs: InputAttrs<String> = Attrs.empty(),
|
||||
contentBuilder: ContentBuilder<HTMLDivElement> = {}
|
||||
) = Div(
|
||||
{
|
||||
@@ -19,6 +20,8 @@ fun DropArea(
|
||||
attrs.builder(this)
|
||||
}
|
||||
) {
|
||||
Input(InputType.File, attrs = { inputAttrs.builder.invoke(this) })
|
||||
FileInput {
|
||||
inputAttrs.builder.invoke(this)
|
||||
}
|
||||
contentBuilder(this)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user