Skip to content

Commit

Permalink
Designer: Add margin and fix gen issues (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
bheston authored Oct 4, 2024
1 parent 38cbaf0 commit 4607477
Show file tree
Hide file tree
Showing 7 changed files with 769 additions and 735 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Add support for margin properties",
"packageName": "@adaptive-web/adaptive-ui",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Add support for margin properties",
"packageName": "@adaptive-web/adaptive-ui-designer-figma",
"email": "[email protected]",
"dependentChangeType": "patch"
}
2 changes: 1 addition & 1 deletion packages/adaptive-ui-designer-figma/src/lib/anatomy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ function parseComponent(node: PluginUINodeData): Anatomy {
function isContextNode(node: PluginUINodeData, componentName: string): boolean {
// Remove non-ascii characters (we tried a convention of decorating template node names)
const nodeName = node.name.replace(/[^\x20-\x7F]/g, "").trim();
return node.type === "COMPONENT" || nodeName.toLowerCase() === componentName.toLowerCase();
return node.type === "COMPONENT" || componentName.toLowerCase().indexOf(nodeName.toLowerCase()) !== -1;
}

function walkNode(node: PluginUINodeData, componentName: string, condition: Record<string, string | boolean> | undefined, anatomy: Anatomy): void {
Expand Down
Loading

0 comments on commit 4607477

Please sign in to comment.