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

[React] Not linking correctly when used at other files #204

Open
Sh031224 opened this issue Nov 7, 2024 · 0 comments
Open

[React] Not linking correctly when used at other files #204

Sh031224 opened this issue Nov 7, 2024 · 0 comments

Comments

@Sh031224
Copy link

Sh031224 commented Nov 7, 2024

Problem

In the file where we created the component, the code is displayed as we intended.

스크린샷 2024-11-07 오후 4 23 40

But if we create another file and then load the component we created, the code doesn't show up at all.

We add a detailed description because it's only happening with our specific component.

More Detail Info

Design

First, we defined the Icon Assets as follows.

image

We then created an additional masked component as Icon/Icons so that when using the icon, it would retain its existing color even if we changed to a different icon.

image

We designed the Icon/Icons component to allow us to swap icon instances freely.

image

Develop

We connected the code as follows.

// Icon Asset
figma.connect(IconBlank, '<FIGMA_ICONS_BASE>?node-id=7-264', {
  variant: { Name: 'blank' },
  example: () => <IconBlank />,
});

// Icon/Icons
figma.connect(IconBlank, '<FIGMA_ICONS_BASE>?node-id=501-7411', {
  variant: {
    Icon: '5:1981',
  },
  example: () => <IconBlank />,
});

Result

Icon Asset worked as intended.

스크린샷 2024-11-07 오후 4 23 40

However, the code doesn't show up at all at Icon/Icons.

Version Info

  • Code Connect CLI version [1.2.2]
  • Operating system [Mac OS 14.5]
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