package nl.astraeus import kotlinx.html.div import nl.astraeus.komp.HtmlBuilder import nl.astraeus.komp.Komponent import nl.astraeus.komp.include import kotlin.browser.document class TextKomponent( val text: String ): Komponent() { override fun HtmlBuilder.render() { div { attributes["style"] = "color: green; margin: 10px; padding: 15px; border: 2px solid green;" + text } } } class TestKomponent: Komponent() { override fun HtmlBuilder.render() { div { + "What!? is this?" include(TextKomponent("MORE TEXT")) } } } fun main() { Komponent.create(document.body!!, TestKomponent()) println("Started zzz") }