Daniel
04/17/2020, 12:50 PM.kt
file for the Alert
component and everything works fine exept importing the CSS resources. For now I dealt with this by importing the CSS file directly in html but I am wondering what would be the proper way of saying the following:
{/* The following line can be included in your src/index.js or App.js file*/}
import 'bootstrap/dist/css/bootstrap.min.css';
Robert Jaros
04/17/2020, 12:52 PMrequire("bootstrap/dist/css/bootstrap.min.css")
Daniel
04/17/2020, 12:55 PMrequire
come from? My intellij does not seem to be able to find it. This is what I have so far:
@file:JsModule("react-bootstrap")
@file:JsNonModule
import react.*
@JsName("Alert")
external val Alert: RClass<AlertProps>
external interface AlertProps: RProps {
var variant: String
}
Daniel
04/17/2020, 12:57 PMbuild.gradle.kts
has the following dependencies:
implementation(npm("react-bootstrap"))
implementation(npm("bootstrap"))
Daniel
04/17/2020, 1:35 PMkotlinext.js.require("")
What would be the preferred place to call it? Doing it in the main
method raises an error:
Uncaught Error: Module parse failed: Unexpected token (6:3)
Daniel
04/17/2020, 2:09 PMRob Murdock
04/17/2020, 3:19 PMRob Murdock
04/17/2020, 3:19 PMDaniel
04/17/2020, 3:42 PMRob Murdock
04/22/2020, 1:56 PMDaniel
04/22/2020, 2:08 PMRob Murdock
04/22/2020, 2:12 PM