feat: make component name accessible

This commit is contained in:
Jonathan Kelley committed 2022-01-31 02:49:37 -05:00
1 parent 4ae11b5756
commit 0820e18d3d
2 files changed
+6

No files matched your search

+3
View File
@@ -135,11 +135,14 @@ impl ToTokens for Component {
None => quote! { None },
};
let fn_name = self.name.segments.last().unwrap().ident.to_string();
tokens.append_all(quote! {
__cx.component(
#name,
#builder,
#key_token,
#fn_name
)
})
}