mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-03 13:20:37 -05:00
e8270cfd54
* refactor * fixes * rename libraries * refactor libraries * fixes
23 lines
541 B
TypeScript
23 lines
541 B
TypeScript
import { overrides as overridesLibrary } from '@plugin/libraries';
|
|
import { syncAttributes } from '@plugin/utils/syncAttributes';
|
|
|
|
import { SyncGroups } from '@ui/lib/types/utils/syncGroups';
|
|
|
|
export const transformOverrides = (node: SceneNode) => {
|
|
const overrides = overridesLibrary.get(node.id);
|
|
if (!overrides) {
|
|
return {};
|
|
}
|
|
|
|
const touched: SyncGroups[] = [];
|
|
|
|
overrides.forEach(override => {
|
|
if (syncAttributes[override]) {
|
|
touched.push(...syncAttributes[override]);
|
|
}
|
|
});
|
|
|
|
return {
|
|
touched
|
|
};
|
|
};
|