updated component
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "osui-element"
|
||||
version = "0.1.15"
|
||||
version = "0.1.16"
|
||||
edition = "2021"
|
||||
description = "The element attribute for defining elements in OSUI"
|
||||
license = "Apache-2.0"
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user