code-connect icon indicating copy to clipboard operation
code-connect copied to clipboard

Ways to use frame width/height in code connect props?

Open Chanki-Min opened this issue 1 year ago • 2 comments

Please provide:

  • Code Connect CLI version : 1.0.4
  • Operating system : macos
  • Code Connect file, Figma design and/or relevant code snippet that could help us get more context

In our team, we use icon component like below. There's no component properties.

So we adjust icon width/height by Frame width and height

스크린샷 2024-08-08 23 53 35

In this situation. We are implementing code connect for this icon

import figma from '@figma/code-connect';
import React from 'react';

import { MonoIconStarSolid } from './MonoIconStarSolid';

figma.connect(
  MonoIconStarSolid,
  'https://figma.com/design/...',
  {
    props: {}, // how can we import frame width/height in hear?
    example: props => <BdsMonoIconStarSolid />,
  }
);

Are code connect has api for using frame width as props?

Chanki-Min avatar Aug 08 '24 14:08 Chanki-Min

Hey @Chanki-Min, we don't provide access to design properties like width and height right now, only component properties. We're always looking to evolve Code Connect to support more use-cases though, so I'll mention your request to the team!

tomduncalf-figma avatar Aug 08 '24 14:08 tomduncalf-figma

I vote for this issue, I would like to get the name of the node and I suppose it's the same

ZeVoidLX56 avatar Sep 02 '24 15:09 ZeVoidLX56