kotlin-wrappers
kotlin-wrappers copied to clipboard
add reactstrap wrapper
Hi, I tried to use reactstrap via dukat without success.
Please add a wrapper.
thanks
https://github.com/reactstrap/reactstrap
Hi, after a few tries I found a working setup to use reactstrap in kotlin.
Keep up the good work !
https://gist.github.com/frhack/d5abdb7db4fd7a0bfcd10411b32f9991
then I just needed to provide the external declarations:
//file Alert.kt
@file:JsModule("reactstrap")
@file:JsNonModule
import react.*
@JsName("Alert")
external val Alert : ComponentClass<AlertProps>
external interface AlertProps : Props {
var color: String
}
and add the css:
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" />
</head>