Haruki
11/13/2022, 5:47 AMh1 {+"Full-Stack Shopping List"}
-> I want to write something like this: h1(classes="hello"){+"Full-Stack Shopping List"}
I realized that for id, I can simply write: h1 {id = "hello" +"Full-Stack Shopping List"}
.
I have researched and it seems like using kotlinx.html (https://github.com/Kotlin/kotlinx.html) might be the solution. However, h1("hello"){+"Full-Stack Shopping List"}
doesn't work.
Does anyone know how to add a class attribute specifically in the App.kt on the tutorial. (https://kotlinlang.org/docs/multiplatform-full-stack-app.html#build-the-user-interface)?CLOVIS
11/13/2022, 12:19 PMHaruki
11/13/2022, 5:21 PM<div class="hello">
in kotlin. Is there a way to add a class attribute? I realize that <div id="hello">
is equivalent to div {id = "hello"}
.CLOVIS
11/13/2022, 5:23 PMclasses = "stuff"
. Compose Web uses classes("stuff")
.
Check which one you're using, then maybe ask again in #kotlinx-html, #react or #compose-web for specificsHaruki
11/13/2022, 5:28 PM