mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
moved body back inside itself to allow forwarding attributes
This commit is contained in:
parent
5f95776a08
commit
218c4d3c90
1 changed files with 3 additions and 3 deletions
|
@ -104,8 +104,6 @@ impl ToTokens for Model {
|
|||
|
||||
let component_fn_prop_docs = generate_component_fn_prop_docs(props);
|
||||
|
||||
let body = &body.block;
|
||||
|
||||
let output = quote! {
|
||||
#[doc = "Props for the [`"]
|
||||
#[doc = #name_stringified]
|
||||
|
@ -122,13 +120,15 @@ impl ToTokens for Model {
|
|||
#vis fn #name #generics (#scope_name: Scope, props: #props_name #generics) #ret
|
||||
#where_clause
|
||||
{
|
||||
#body
|
||||
|
||||
let #props_name {
|
||||
#prop_names
|
||||
} = props;
|
||||
|
||||
leptos::Component::new(
|
||||
stringify!(#name),
|
||||
move |#scope_name| { #body }
|
||||
move |cx| #name(cx, #prop_names)
|
||||
)
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue