Skip to content

Commit 288dfaa

Browse files
committed
Fix Flutter children.
1 parent 1f3461a commit 288dfaa

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

packages/backend/src/flutter/flutterMain.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,11 @@ const flutterContainer = (node: SceneNode, child: string): string => {
153153
// propChild = generateWidgetCode("Stack", {
154154
// children: [prop1, prop2],
155155
// });
156-
// } else if (child.length > 0) {
157-
// propChild = child;
158-
// } else if (image.length > 0) {
156+
// }
157+
if (child.length > 0) {
158+
propChild = child;
159+
}
160+
// else if (image.length > 0) {
159161
// propChild = image;
160162
// }
161163

packages/backend/src/tailwind/builderImpl/tailwindColor.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,13 @@ export const tailwindColorFromFills = (
1313

1414
const fill = retrieveTopFill(fills);
1515
if (fill && fill.type === "SOLID") {
16-
// don't set text color when color is black (default) and opacity is 100%
1716
return tailwindSolidColor(fill, kind);
1817
}
1918

2019
return "";
2120
};
2221

2322
export const tailwindSolidColor = (fill: SolidPaint, kind: string): string => {
24-
// don't set text color when color is black (default) and opacity is 100%
25-
if (
26-
kind === "text" &&
27-
fill.color.r === 0.0 &&
28-
fill.color.g === 0.0 &&
29-
fill.color.b === 0.0 &&
30-
fill.opacity === 1.0
31-
) {
32-
return "";
33-
}
34-
3523
const opacity = fill.opacity ?? 1.0;
3624

3725
// example: text-opacity-50

packages/backend/src/tailwind/tailwindMain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,6 @@ export const tailwindSection = (node: SectionNode, isJsx: boolean): string => {
250250

251251
export const tailwindCodeGenTextStyles = () => {
252252
return previousExecutionCache
253-
.map((style) => `// ${style.text}\n${style.style}`)
253+
.map((style) => `// ${style.text}\n${style.style.split(" ").join("\n")}`)
254254
.join("\n---\n");
255255
};

0 commit comments

Comments
 (0)