0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-31 12:03:58 -05:00
penpot-exporter-figma-plugin/plugin-src/translators/styles/translateStyleName.ts

10 lines
222 B
TypeScript
Raw Permalink Normal View History

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