* initialize figma plugin * Add icons to view * Make the plugin work * Fix search hook * Finialize figma plugin * Finish up icons * remove unused code * Add cover and icon
10 lines
267 B
TypeScript
10 lines
267 B
TypeScript
figma.showUI(__html__, { width: 300, height: 400 })
|
|
|
|
figma.ui.onmessage = ({name, svg}) => {
|
|
const icon = figma.createNodeFromSvg(svg)
|
|
icon.name = name
|
|
icon.x = figma.viewport.center.x
|
|
icon.y = figma.viewport.center.y
|
|
figma.currentPage.selection = [icon]
|
|
}
|