-
Notifications
You must be signed in to change notification settings - Fork 12
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
Retrieving values from a node's children to display for that node #56
Comments
i think the best way to do this is to put a template on the child that renders the child code and use |
Hey Jake, can you please explain a bit more on what you mean by putting a "template on the child that renders the child code and use figma.children on the parent"? Do you have an example? I take it that query language isn't possible? In our case, if a node has the name "union" then we would always want the cssFill value of the unioned node to be used for the child svg node. So in our case we could just use an if statement that matches against the parent's name value. eg. {{?figma.parent.node.name = "union"}} <toolkit:IconTintColorBehavior TintColor="figma.parent.cssFill" /> |
so this is sounding more like parent params being passed to child templates. i can leave this open, but cannot get to handling this level of complexity in the language right now. |
How do I get the name value of a child node and display that as the name for the parent node?
For example, I want to use the name "undo-icon-32p" of a child "VECTOR" node (the image) inside a unioned "BOOLEAN_OPERATION" node (the frame) with the name "union".
Can this be done with something like {{node.child.name}} or something similar?
*Note that I added cssFill in there for simplicity, this wouldn't actually be visible in the final code output, because the idea would be that the css.fill value for the parent node would be shown for the child node's "TintColor":
The text was updated successfully, but these errors were encountered: