updated component
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "osui-element"
|
name = "osui-element"
|
||||||
version = "0.1.15"
|
version = "0.1.16"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "The element attribute for defining elements in OSUI"
|
description = "The element attribute for defining elements in OSUI"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|||||||
@@ -141,14 +141,14 @@ pub fn component(_args: TokenStream, input: TokenStream) -> TokenStream {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let expanded = quote! {
|
let expanded = quote! {
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Default)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
#visibility struct #fn_name {
|
#visibility struct #fn_name {
|
||||||
#(#struct_fields),*
|
#(#struct_fields),*
|
||||||
}
|
}
|
||||||
|
|
||||||
impl #fn_name {
|
impl Component for #fn_name {
|
||||||
pub fn create_element(&self) -> #return_type {
|
fn create_element(&self) -> #return_type {
|
||||||
#code
|
#code
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user