Closed jongjunpark closed 3 days ago
Hi, could you share your Code Connect for this? I'm not 100% clear on what the question is. Thanks
Hi, @tomduncalf-figma.
If stickyHeader
is set to false, then nestedProps("Desktop") should have the properties type
, withDescription
, and closeButton
. On the other hand, if stickyHeader
is set to true, then nestedProps("Desktop") should not include these properties.
I think it can be set up like this code,
stickyHeader: figma.boolean("stickyHeader", {
true: undefined,
false: figma.nestedProps("Desktop", {
type: figma.enum("type", {
leftAlign: "leftAlign",
centerAlign: "centerAlign",
}),
closeButton: figma.boolean("closeButtton"),
showHeadingText: figma.boolean("showHeadingText"),
}),
}),
but I'm getting an error saying "Could not find prop mapping for stickyHeader in the props object"
Additionally, even though I set stickyHeader.type as an enum, it shows up as a string instead of an enum.
It might be easiest if we can see your Figma file and your full Code Connect file for this case. Assuming you don't want to share that publicly, you can contact Figma support, mentioning that you have been referred from Github and would like to share your files with the team, and they have a process to give us temporary access
Hey! Just wanted to follow up here that we're including a fix for using figma.nestedProps
in figma.boolean
in the next release - it looks like it will hopefully solve this issue for you, will follow up here once we've made the release
We just released Code Connect v1.1.1 which should resolve this issue. Please feel free to reopen the issue or create a new one if you continue to have issues.
stickyHeader: false
-> hastype
,withDescription
,closeButton
propertiesstickyHeader: true
-> hidetype
,withDescription
,closeButton
propertiesHow can I control it?