0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 13:43:03 -05:00
penpot-exporter-figma-plugin/plugin-src/translators/styles/translateStyleName.ts
Jordi Sala Morales 53672d8b43
Fix style paths (#194)
* Fix style path

* add changelog
2024-06-28 08:32:56 +02:00

9 lines
222 B
TypeScript

export const translateStyleName = (figmaStyle: BaseStyle): string => {
const splitName = figmaStyle.name.split('/');
if (splitName.length > 0) {
return splitName.pop() as string;
}
return figmaStyle.name;
};