MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / getComponentProperties

Function getComponentProperties

packages/extension/utils/component.ts:61–75  ·  view source on GitHub ↗
(node: SceneNode)

Source from the content-addressed store, hash-verified

59}
60
61function getComponentProperties(node: SceneNode): Record<string, ComponentPropertyData> | null {
62 if (!('componentProperties' in node)) {
63 return null
64 }
65
66 try {
67 const properties = node.componentProperties
68 if (!properties || typeof properties !== 'object') {
69 return {}
70 }
71 return properties as Record<string, ComponentPropertyData>
72 } catch {
73 return {}
74 }
75}
76
77function getMainComponentSummary(node: SceneNode): { id: string; name: string } | null {
78 if (!('mainComponent' in node)) {

Callers 1

getDesignComponentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected