mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
* Fix tests * Remove generics from virtual dom * Prep for degenerify * Fix examples * Remove props cloning * Fix tests
25 lines
666 B
Rust
25 lines
666 B
Rust
#[macro_export]
|
|
macro_rules! pass_helper {
|
|
( @html ) => { html! {} };
|
|
( @html html! { $($view:tt)* }; $($tail:tt)* ) => {
|
|
html! { $($view)* };
|
|
pass_helper! { @ html $($tail)* }
|
|
};
|
|
( @html $head:stmt; $($tail:tt)* ) => {
|
|
$head
|
|
pass_helper! { @ html $($tail)* }
|
|
};
|
|
( $($content:tt)* ) => {
|
|
mod test_component;
|
|
use yew::prelude::*;
|
|
#[allow(unused)]
|
|
use test_component::TestComponent;
|
|
struct SubComponent;
|
|
impl Renderable for SubComponent {
|
|
fn render(&self) -> Html {
|
|
pass_helper! { @ html $($content)* }
|
|
}
|
|
}
|
|
};
|
|
}
|