Fix component names when they are re-exported (#2744)

* Fix component names when they are re-exported
* Fix read only signal props expansion
This commit is contained in:
Evan Almloff authored and GitHub committed 2024-07-30 12:28:19 -07:00
1 parent 34bdcd15cf
commit 115cc0ad42
5 files changed
+9 -23

No files matched your search

+1 -9
View File
@@ -24,7 +24,7 @@ use std::{collections::HashSet, vec};
use syn::{
parse::{Parse, ParseStream},
spanned::Spanned,
token, AngleBracketedGenericArguments, Expr, Ident, PathArguments, Result,
token, AngleBracketedGenericArguments, Expr, PathArguments, Result,
};
#[derive(PartialEq, Eq, Clone, Debug)]
@@ -92,9 +92,6 @@ impl ToTokens for Component {
// Create props either from manual props or from the builder approach
let props = self.create_props();
// Make sure we stringify the component name
let fn_name = self.fn_name().to_string();
// Make sure we emit any errors
let diagnostics = &self.diagnostics;
@@ -109,7 +106,6 @@ impl ToTokens for Component {
#props
}).into_vcomponent(
#name #generics,
#fn_name
);
#diagnostics
__comp
@@ -302,10 +298,6 @@ impl Component {
.collect()
}
fn fn_name(&self) -> Ident {
self.name.segments.last().unwrap().ident.clone()
}
fn empty(name: syn::Path, generics: Option<AngleBracketedGenericArguments>) -> Self {
let mut diagnostics = Diagnostics::new();
diagnostics.push(