@builder.io/mitosis
Version:
Write components once, run everywhere. Compiles to Vue, React, Solid, and Liquid. Import code from Figma and Builder.io
21 lines (20 loc) • 686 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseEach = void 0;
const children_1 = require("../helpers/children");
const mitosis_node_1 = require("../helpers/mitosis-node");
const bindings_1 = require("../../../helpers/bindings");
function parseEach(json, node) {
return {
...(0, mitosis_node_1.createMitosisNode)(),
name: 'For',
scope: { forName: node.context.name },
bindings: {
each: (0, bindings_1.createSingleBinding)({
code: node.expression.name,
}),
},
children: (0, children_1.parseChildren)(json, node),
};
}
exports.parseEach = parseEach;
;