INSAgenda / yew-template

A crate to separate your HTML from your Rust code when using Yew
https://crates.io/crates/yew-template
MIT License
39 stars 3 forks source link

Optional args disabling parts of html if missing #4

Closed Mubelotix closed 1 year ago

Mubelotix commented 1 year ago

Goal:

<div opt>
     [opt_value]
</div>

Expands to

if let Some(opt_value) = opt_value {
    <div>
        opt_value
    </div>
}
Mubelotix commented 1 year ago

This requires changing the representation of HtmlTokens