1
0
mirror of https://github.com/bobwen-dev/react-templates synced 2025-04-12 00:56:39 +02:00
react-templates/test/data/propTemplates/siblingTemplates.rt.js
Marcus R. Brown 4a403dffbf Fix code generation for rt-template siblings. (#164)
* Clean up the list of propTemplates fixtures.

* Subtract the child index of a rt-template tag by the number of rt-template tags seen.

Fixes wix/react-templates#163.
2016-07-21 10:26:18 +03:00

23 lines
715 B
JavaScript

define([
'react',
'lodash'
], function (React, _) {
'use strict';
function templateProp11(brother) {
return React.createElement('div', {}, 'Brother: ', brother);
}
function templateProp22(sister) {
return React.createElement('div', {}, 'Sister: ', sister);
}
function templateProp33(other) {
return React.createElement('div', {}, 'Other: ', other);
}
return function () {
return React.createElement('div', {
'templateProp1': templateProp11.bind(this),
'templateProp2': templateProp22.bind(this),
'templateProp3': templateProp33.bind(this)
}, React.createElement('div', {}, 'Separator'));
};
});