code-connect
code-connect copied to clipboard
Ways to use frame width/height in code connect props?
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
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?
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!
I vote for this issue, I would like to get the name of the node and I suppose it's the same