Sha256: dd0d4b4b63a8ea7882a08d8aadf824e88bf3882721a7089431c311145bd93be9
Contents?: true
Size: 632 Bytes
Versions: 5
Compression:
Stored size: 632 Bytes
Contents
<%= file_header %>var <%= component_name %> = createReactClass({ <% if attributes.size > 0 -%> propTypes: { <% attributes.each_with_index do |attribute, idx| -%> <%= attribute[:name].camelize(:lower) %>: <%= attribute[:type] %><% if (idx < attributes.length-1) %>,<% end %> <% end -%> }, <% end -%> render: function() { <% if attributes.size > 0 -%> return ( <div> <% attributes.each do |attribute| -%> <div><%= attribute[:name].titleize %>: {this.props.<%= attribute[:name].camelize(:lower) %>}</div> <% end -%> </div> ); <% else -%> return <div />; <% end -%> } }); <%= file_footer %>
Version data entries
5 entries across 5 versions & 1 rubygems