sample_generator/sample_generator.rs
1use htmlificator::Element;
2
3fn main() {
4 let mut el = Element::new("Div", false);
5 el.add_class("TestClass");
6 el.add_class("AnotherClass");
7 let mut h1 = Element::new("H1", false);
8 h1.add_text("This is a heading!!");
9 el.add_element(h1);
10 el.add_comment("A Comment");
11 let mut btn = Element::new("Button", true);
12 btn.add_attribute("text", "This is a Button");
13 el.add_element(btn);
14 println!("{}", el)
15}