hello, I'm trying to use react-modal library <http...
# react
j
hello, I'm trying to use react-modal library https://www.npmjs.com/package/react-modal and I want to write children RDOMBuilder inside, how can I do this?
I will answer my own question:
Copy code
fun RBuilder.reactModal(isOpen: Boolean = false,onRequestClose: ((event: dynamic ) -> Unit)? =null, handler: RHandler<ReactModal.Props>) = child(ReactModal::class) {
    attrs.isOpen=isOpen
    onRequestClose?.let {
        attrs.onRequestClose?.invoke(onRequestClose)
    }

    handler()
}
just call a handler which is the same in child() function
d
Hi @Juanoterocas. Do you have a kotlin wrapper for the modal? If so, I would really appreciate if you could share it. Thanks in advance
Nevermind, I just used dukat to generate kotlin
j
sorry for late response, I used dukat as well with some modifications