(node: SceneNode, child: string)
| 200 | }; |
| 201 | |
| 202 | const composeContainer = (node: SceneNode, child: string): string => { |
| 203 | let propChild = ""; |
| 204 | |
| 205 | if ("fills" in node && node.fills !== figma.mixed && retrieveTopFill(node.fills as any)?.type === "IMAGE") { |
| 206 | addWarning("Image fills are replaced with placeholders in Compose"); |
| 207 | } |
| 208 | |
| 209 | if (child.length > 0) { |
| 210 | propChild = child; |
| 211 | } |
| 212 | |
| 213 | const builder = new ComposeDefaultBuilder(propChild) |
| 214 | .createContainer(node) |
| 215 | .blendAttr(node) |
| 216 | .position(node); |
| 217 | |
| 218 | return builder.child; |
| 219 | }; |
| 220 | |
| 221 | const composeText = (node: TextNode): string => { |
| 222 | const builder = new ComposeTextBuilder().createText(node); |
no test coverage detected