utkarshkukreti / markup.rs

A blazing fast, type-safe template engine for Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for spreading classes

jquesada2016 opened this issue · comments

This is something that might be possible, but did not see it in the docs anywhere.

Would it be possible to support arbitrary class spreading, much like the attribute spread syntax?

markup::define! {
  Button<I: Iterator<Item = String>>(
    extra_classes: I,
  ) {
    button .btn ..extra_classes {
      "Click Me!"
    }
  }
}