UNPKG

motion

Version:

motion - moving development forward

18 lines (14 loc) 719 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _helpers = require('../lib/helpers'); exports.default = { enter(node, parent, scope) { if (node.name.name == 'sync') { return [_helpers.t.JSXAttribute(_helpers.t.literal('__motionValue'), node.value), _helpers.t.JSXAttribute(_helpers.t.literal('__motionOnChange'), _helpers.t.functionExpression(null, [_helpers.t.identifier('__motionval__')], _helpers.t.blockStatement([_helpers.t.expressionStatement(_helpers.t.assignmentExpression('=', node.value, _helpers.t.identifier('__motionval__')))])))]; } node.name.name = (0, _helpers.niceJSXAttributes)(node.name.name); } }; //# sourceMappingURL=JSXAttribute.js.map