@builder.io/mitosis 0.5.19 → 0.5.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -50,8 +50,8 @@ const blockToSolid = (json, component, options, insideJsx) => {
|
|
|
50
50
|
</For>`;
|
|
51
51
|
}
|
|
52
52
|
let str = '';
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
53
|
+
const isFragment = json.name === 'Fragment';
|
|
54
|
+
if (isFragment) {
|
|
55
55
|
str += '<';
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
@@ -61,15 +61,19 @@ const blockToSolid = (json, component, options, insideJsx) => {
|
|
|
61
61
|
str += `fallback={${(0, exports.blockToSolid)(json.meta.else, component, options, false)}}`;
|
|
62
62
|
}
|
|
63
63
|
const classString = (0, styles_1.collectClassString)(json, options);
|
|
64
|
-
if (classString) {
|
|
64
|
+
if (classString && !isFragment) {
|
|
65
65
|
str += ` class=${classString} `;
|
|
66
66
|
}
|
|
67
67
|
for (const key in json.properties) {
|
|
68
|
+
if (isFragment)
|
|
69
|
+
continue;
|
|
68
70
|
const value = json.properties[key];
|
|
69
71
|
const newKey = transformAttributeName(key);
|
|
70
72
|
str += ` ${newKey}="${value}" `;
|
|
71
73
|
}
|
|
72
74
|
for (const key in json.bindings) {
|
|
75
|
+
if (isFragment)
|
|
76
|
+
continue;
|
|
73
77
|
const { code, arguments: cusArg = ['event'], type } = json.bindings[key];
|
|
74
78
|
if (!code)
|
|
75
79
|
continue;
|
|
@@ -122,7 +126,7 @@ const blockToSolid = (json, component, options, insideJsx) => {
|
|
|
122
126
|
.map((item) => (0, exports.blockToSolid)(item, component, options, true))
|
|
123
127
|
.join('\n');
|
|
124
128
|
}
|
|
125
|
-
if (
|
|
129
|
+
if (isFragment) {
|
|
126
130
|
str += '</>';
|
|
127
131
|
}
|
|
128
132
|
else {
|