mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-09 08:30:08 -05:00
24 lines
535 B
TypeScript
24 lines
535 B
TypeScript
|
import { overridesLibrary } from '@plugin/OverridesLibrary';
|
||
|
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
|
||
|
};
|
||
|
};
|