File tree Expand file tree Collapse file tree 3 files changed +9
-21
lines changed Expand file tree Collapse file tree 3 files changed +9
-21
lines changed Original file line number Diff line number Diff line change 11< %= file_header % > class < %= component_name % > extends React.Component {
22 render ( ) {
3- < % if attributes . size > 0 - % >
43 return (
5- < div >
4+ < React . Fragment >
65< % attributes . each do | attribute | - % >
7- < div > < %= attribute [ :name ] . titleize % > : { this . props . < %= attribute [ :name ] . camelize ( :lower ) % > } </ div >
6+ < %= attribute [ :name ] . titleize % > : { this . props . < %= attribute [ :name ] . camelize ( :lower ) % > }
87< % end - % >
9- </ div >
8+ </ React . Fragment >
109 );
11- < % else - % >
12- return < div /> ;
13- < % end - % >
1410 }
1511}
1612
Original file line number Diff line number Diff line change 88< % end - % >
99
1010 render: function() {
11- < % if attributes . size > 0 -%>
1211 return (
13- < div >
12+ < React . Fragment >
1413< % attributes . each do | attribute | - % >
15- < div > < %= attribute [ :name ] . titleize % > : { this . props . < %= attribute [ :name ] . camelize ( :lower ) % > } </ div >
14+ < %= attribute [ :name ] . titleize % > : { this . props . < %= attribute [ :name ] . camelize ( :lower ) % > }
1615< % end - % >
17- </ div >
16+ </ React . Fragment >
1817 );
19- < % else - % >
20- return < div /> ;
21- < % end - % >
2218 }
2319} ) ;
2420< %= file_footer % >
Original file line number Diff line number Diff line change 77
88< % end -% >
99 render : ->
10- < % if attributes .size > 0 -% >
11- `<div >
10+ `<React.Fragment >
1211< % attributes .each do | attribute| -% >
13- <div >< %= attribute[: name].titleize % > : {this .props .< %= attribute[: name].camelize (: lower) % > }</div >
14- < % end -% >
15- </div >`
16- < % else -% >
17- ` < div / > `
12+ < %= attribute[: name].titleize % > : {this .props .< %= attribute[: name].camelize (: lower) % > }
1813< % end -% >
14+ </React.Fragment >`
1915< %= file_footer % >
You can’t perform that action at this time.
0 commit comments