Open
Description
Good day!
Similar to #215, our designer is also using Icons as children instead of instance swap properties.
Is it possible to use the getProps
on this result to get the properties of this mapped instance?
Figma
What I'd like to do
figma.children('*').getProps<{ name: string }>()
Similar to
figma.instance('icon').getProps<{ name: string }>()
Note: when there is an instance swap property, figma.instance('icon').getProps<{ name: string }>()
does work but this specific component in Figma does not have one.
What it looks like now
<Badge icon={<Icon icon="IconName" size={16} />} />
What I would like it to be
<Badge icon="IconName" />
Please provide:
- Code Connect CLI version [use npx figma -V if using React, or figma -V otherwise, to get the version of your CLI]
- 1.2.4
- Operating system
- macOS 15.2 (25C101)
Thanks for the help!