kjsuikit/src/jsMain/kotlin/dev/inmo/jsuikit/elements/DropArea.kt

26 lines
650 B
Kotlin
Raw Normal View History

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
import org.jetbrains.compose.web.dom.*
import org.w3c.dom.HTMLDivElement
@Composable
fun DropArea(
attrs: Attrs<HTMLDivElement> = Attrs.empty(),
inputAttrs: InputAttrs<String> = InputAttrs.empty(),
contentBuilder: ContentBuilder<HTMLDivElement> = {}
) = Div(
{
include(UIKitPlaceholder, UIKitForm.Custom())
attrs.builder(this)
}
) {
2022-03-02 12:40:07 +00:00
FileInput {
inputAttrs.builder.invoke(this)
}
contentBuilder(this)
}