File tree Expand file tree Collapse file tree
packages/reflex-base/src/reflex_base/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,6 +113,12 @@ def comp_name(comp: str | tuple[str, str]) -> str:
113113 return comp [0 ] if isinstance (comp , tuple ) else comp
114114
115115
116+ def comp_alias (comp : str | tuple [str , str ]) -> str :
117+ """Get the component alias from the mapping value.
118+
119+ This is the name external users will import.
120+
121+ Args:
116122def comp_alias(comp: str | tuple[str, str]) -> str:
117123 """ Get the component alias from the mapping value .
118124
@@ -122,9 +128,8 @@ def comp_alias(comp: str | tuple[str, str]) -> str:
122128 comp : The component name or a tuple of (component name , alias ).
123129
124130 Returns :
125- The component alias, or None if there is no alias.
131+ The component alias , or the component name itself if there is no alias .
126132 """
127- return comp [1 ] if isinstance (comp , tuple ) else comp
128133
129134
130135def comp_path(path: str, comp: str | tuple[str, str]) -> str:
You can’t perform that action at this time.
0 commit comments