template Subheadline { let text = #String; {text} } template HeadlineSecondary { let class = #String? |> Base:Fn.default(""); let tag = #String? |> Base:Fn.default("h3"); let data = #Record(of: { text: if (tag == "h2") #String else "No no no ... make h2 when you want text", subheadline?: if (tag == "h2") #String }); let class = "HeadlineSecondary $(class)"; let content = <> {if (data.subheadline) } {data.text} ; if (tag == "h1") {

{content}

} else if (tag == "h2") {

{content}

} else if (tag == "h3") {

{content}

} else if (tag == "h4") {

{content}

} else if (tag == "h5") {
{content}
} else if (tag == "h6") {
{content}
} else { "INVALID TAG!" } }