Jonathan Smith
01/10/2023, 3:02 PMimport react.dom.html.ReactHTML.*
as an HTML DSL instead of the kotlinx.html
library and is missing some features. The documentation for kotlinx.html
on the wiki says div(classes="c1 c2") { ... }
should work but the ReactHTML library does not seem to support the classes
argument. I did not find an easy way to substitute kotlinx.html
in the code. Why the difference? Is there a work-around? Thanks!Dirk
01/10/2023, 3:09 PMdiv {
className = csstype.ClassName("c1")
}
Dirk
01/10/2023, 3:11 PMdiv {
className = ClassName {
marginBottom = 5.px
}
}
Jonathan Smith
01/10/2023, 3:15 PMJonathan Smith
01/10/2023, 3:17 PMturansky
01/10/2023, 8:06 PMClassName
- it’s expected, that you will have constants for class names in cases like this.
Will it be more usefull?! 😉Jonathan Smith
01/10/2023, 8:34 PM