mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 21:53:27 -05:00
53672d8b43
* Fix style path * add changelog
16 lines
320 B
TypeScript
16 lines
320 B
TypeScript
export const translateStylePath = (figmaStyle: BaseStyleMixin) => {
|
|
const path = [];
|
|
|
|
if (figmaStyle.remote) {
|
|
path.push('Remote');
|
|
}
|
|
|
|
if (figmaStyle.name.includes('/')) {
|
|
const pathParts = figmaStyle.name.split('/');
|
|
pathParts.pop();
|
|
|
|
path.push(...pathParts);
|
|
}
|
|
|
|
return path.join(' / ');
|
|
};
|