0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2025-04-18 01:34:17 -05:00
This commit is contained in:
Alex Sánchez 2024-06-24 08:43:06 +02:00
parent 25b93059f2
commit b2dd23d6af
No known key found for this signature in database
GPG key ID: 68A95170EEB87E16
2 changed files with 15 additions and 2 deletions

View file

@ -1,7 +1,10 @@
export type ComponentProperty = {
type: ComponentPropertyType;
type: 'BOOLEAN' | 'TEXT' | 'INSTANCE_SWAP' | 'VARIANT';
defaultValue: string | boolean;
preferredValues?: InstanceSwapPreferredValue[];
preferredValues?: {
type: 'COMPONENT' | 'COMPONENT_SET';
key: string;
}[];
variantOptions?: string[];
};
class ComponentPropertiesLibrary {

View file

@ -43,6 +43,16 @@ export const transformInstanceNode = async (
);
}
if (node.visible !== mainComponent.visible) {
overridesLibrary.register(node.id, ['visible']);
}
if (node.locked !== mainComponent.locked) {
overridesLibrary.register(node.id, ['locked']);
}
if (node.id === 'I1:360;304:2177') {
console.log(node, mainComponent);
}
return {
type: 'instance',
name: node.name,