Something went wrong. Try again.
A component based functional template language
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546component Headline { let text = #String; let subheadline? = #Record( of: { text: #String, highlight: #Boolean, }, ); let tags? = #Array(of: #String); <h2> { if (subheadline) { <span class={if (subheadline.highlight) "highlight" else "normal"}> {subheadline.text} </span> } } {text} { if (tags) { <ul> {for (tag in tags) { <li> {tag} </li> }} </ul> } } </h2>}component Component { <section> <Headline text="My Headline" subheadline={ { highlight: true, text: "Subheadline!", } } tags={["some", "array", "test"]} /> </section>}