Replace external enum with external sealed object

This commit is contained in:
Alexander Nozik 2023-10-18 11:31:11 +03:00
parent 001efa711a
commit 2578fd6f77

View File

@ -9,11 +9,18 @@ import react.Component
import react.Props
import react.State
external enum class DropEffects {
copy,
move,
link,
none
sealed external class DropEffects {
@JsName("copy")
object Copy : DropEffects
@JsName("move")
object Move : DropEffects
@JsName("link")
object Link : DropEffects
@JsName("none")
object None : DropEffects
}
external interface FileDropProps : Props {
@ -26,6 +33,7 @@ external interface FileDropProps: Props {
var onFrameDragEnter: ((event: DragEvent) -> Unit)?
var onFrameDragLeave: ((event: DragEvent) -> Unit)?
var onFrameDrop: ((event: DragEvent) -> Unit)?
// var onDragOver: ReactDragEventHandler<HTMLDivElement>?
// var onDragLeave: ReactDragEventHandler<HTMLDivElement>?
var onDrop: ((files: FileList?, event: dynamic) -> Unit)?//event:DragEvent<HTMLDivElement>)