0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 13:43:03 -05:00
penpot-exporter-figma-plugin/plugin-src/OverridesLibrary.ts
Alex Sánchez 4591369e3c
Instances Overrides (#166)
* wip

* added support for overrides

* fixes
2024-06-17 09:58:23 +02:00

13 lines
384 B
TypeScript

class OverridesLibrary {
private overrides: Map<string, NodeChangeProperty[]> = new Map();
public register(nodeId: string, overrides: NodeChangeProperty[]): void {
this.overrides.set(nodeId, overrides);
}
public get(nodeId: string): NodeChangeProperty[] | undefined {
return this.overrides.get(nodeId);
}
}
export const overridesLibrary = new OverridesLibrary();