Feat: props now autoderives its own trait

This commit is contained in:
Jonathan Kelley committed 2021-03-12 15:41:36 -05:00
1 parent d4f1ceaffb
commit b3c96a5996
10 files changed
+123 -83

No files matched your search

+15
View File
@@ -678,6 +678,14 @@ Finally, call `.build()` to create the instance of `{name}`.
}
}
}
impl #impl_generics dioxus::prelude::Properties for #name #ty_generics{
type Builder = #builder_name #generics_with_empty;
fn builder() -> Self::Builder {
#name::builder()
}
}
})
}
@@ -1071,6 +1079,13 @@ Finally, call `.build()` to create the instance of `{name}`.
}
)
}
pub fn build_props_impl(&self) -> TokenStream {
// SomeProps: #name
// #builder_name
// #generics_with_empty
quote! {}
}
}
#[derive(Debug, Default)]