Function sauron_core::html::attributes::classes_flag
source · [−]Expand description
A helper function which takes an array of tuple of class and a flag. The final class is assembled using only the values that has a flag which evaluates to true.
Examples
use sauron::prelude::*;
let is_hidden = true;
let has_error = true;
let line:Attribute<()> = classes_flag([
("dashed", is_hidden),
("error", has_error),
]);