Hi, I am doing the tutorial to build a ShoppingList full stack app, and I was wondering how to add a class/id attribute for HTML on App.kt.
For example,
h1 {+"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)?