2022-03-02 10:52:58 +00:00
|
|
|
package dev.inmo.jsuikit.elements
|
|
|
|
|
|
|
|
import androidx.compose.runtime.Composable
|
|
|
|
import dev.inmo.jsuikit.modifiers.*
|
|
|
|
import dev.inmo.jsuikit.utils.Attrs
|
2022-03-02 12:40:07 +00:00
|
|
|
import dev.inmo.jsuikit.utils.InputAttrs
|
2022-03-02 10:52:58 +00:00
|
|
|
import org.jetbrains.compose.web.dom.*
|
|
|
|
import org.w3c.dom.HTMLDivElement
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
fun DropArea(
|
|
|
|
attrs: Attrs<HTMLDivElement> = Attrs.empty(),
|
2022-03-02 12:40:07 +00:00
|
|
|
inputAttrs: InputAttrs<String> = Attrs.empty(),
|
2022-03-02 10:52:58 +00:00
|
|
|
contentBuilder: ContentBuilder<HTMLDivElement> = {}
|
|
|
|
) = Div(
|
|
|
|
{
|
|
|
|
include(UIKitPlaceholder, UIKitForm.Custom())
|
|
|
|
attrs.builder(this)
|
|
|
|
}
|
|
|
|
) {
|
2022-03-02 12:40:07 +00:00
|
|
|
FileInput {
|
|
|
|
inputAttrs.builder.invoke(this)
|
|
|
|
}
|
2022-03-02 10:52:58 +00:00
|
|
|
contentBuilder(this)
|
|
|
|
}
|