mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 13:43:03 -05:00
17 lines
320 B
TypeScript
17 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(' / ');
|
||
|
};
|