Last active
March 31, 2021 07:21
-
-
Save kemiljk/e7a76fbdcc39ebe578bc50bea224d744 to your computer and use it in GitHub Desktop.
A quick way to grab all instances that match your selection for easy switching
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let iconName: String | |
let getInstances | |
const { selection } = figma.currentPage | |
function getInstanceByName(node) { | |
iconName = selection[0].name | |
} | |
getInstanceByName(selection) | |
getInstances = figma.currentPage.findAll(isInstance).filter((node) => node.name === iconName); | |
figma.currentPage.selection = getInstances | |
figma.notify(`${getInstances.length} ${iconName}'s selected`) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment