Sha256: bb2478551e2c0c1b7ae1593ae4f3459dc6973a8373af2995581e420d0525bda7
Contents?: true
Size: 570 Bytes
Versions: 14
Compression:
Stored size: 570 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() { return ( <React.Fragment> <% attributes.each do |attribute| -%> <%= attribute[:name].titleize %>: {this.props.<%= attribute[:name].camelize(:lower) %>} <% end -%> </React.Fragment> ); } }); <%= file_footer %>
Version data entries
14 entries across 14 versions & 1 rubygems