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