updated component

This commit is contained in:
2024-12-23 00:28:14 +01:00
parent 8550b5f6ff
commit 2d0668955e
3 changed files with 17 additions and 4 deletions
+3 -3
View File
@@ -141,14 +141,14 @@ pub fn component(_args: TokenStream, input: TokenStream) -> TokenStream {
});
let expanded = quote! {
#[derive(Debug)]
#[derive(Debug, Default)]
#[allow(non_camel_case_types)]
#visibility struct #fn_name {
#(#struct_fields),*
}
impl #fn_name {
pub fn create_element(&self) -> #return_type {
impl Component for #fn_name {
fn create_element(&self) -> #return_type {
#code
}
}