Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename children React tag when in another component #161

Open
ericandrewscott opened this issue Sep 13, 2024 · 0 comments
Open

rename children React tag when in another component #161

ericandrewscott opened this issue Sep 13, 2024 · 0 comments

Comments

@ericandrewscott
Copy link

ericandrewscott commented Sep 13, 2024

Ran into a snafu (thought it's mostly how our components are built).

We connected our code for Avatar:

<Avatar text="AB" size="extra_large" />

Pretty simple, right? So for our AvatarGroup, we should just be able to do the wrapper component and then {children}, right? WRONG.

Because the code for AvatarGroup should look like:

<AvatarGroup overflow={4}>
  <AvatarGroupItem text="AB" border />
  <AvatarGroupItem text="AB" border />
  <AvatarGroupItem text="AB" border />
  <AvatarGroupItem text="AB" border />
  <AvatarGroupItem text="+3" border />
</AvatarGroup>

Any ideas on how to accommodate for that? In Figma, the child components in the Group are the same as the individual Avatar component 😢 😡

tldr; I'd like for a way to rename the component when it is specifically the child of another component.

  • Code Connect CLI version 1.1.3
  • Operating system OSX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant