Sha256: 3a21cff6552d841ccc2a08cb6ea9478a55374c41c2718ab11e9854fb2cd4ceae
Contents?: true
Size: 600 Bytes
Versions: 25
Compression:
Stored size: 600 Bytes
Contents
var <%= file_name.camelize %> = React.createClass({ <% 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 -%> } });
Version data entries
25 entries across 25 versions & 1 rubygems