Feat: docs, code frm percy

This commit is contained in:
Jonathan Kelley committed 2021-01-14 02:56:41 -05:00
commit 2b9c8d09d9
72 files changed
+5130

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
# html-macro
```rust
use html_macro::*;
fn main () {
let component = html! { <div id='component'>Some component</div> };
let text_var = "You can interpolate text variables";
let html = html! {
<div onclick=|_ev: web_sys::MouseEvent| {}>
You can type text right into the elements
{ component }
{ text_var }
</div>
};
println!("{}", node);
}
```