Sha256: 795fa5e97e30334c97924afe828ffa01fb723c5ac45c1dfc161d8474706d414f
Contents?: true
Size: 616 Bytes
Versions: 24
Compression:
Stored size: 616 Bytes
Contents
class <%= file_name.camelize %> extends React.Component { render () { <% 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 -%> } } <% if attributes.size > 0 -%> <%= file_name.camelize %>.propTypes = { <% attributes.each_with_index do |attribute, idx| -%> <%= attribute[:name].camelize(:lower) %>: <%= attribute[:type] %><% if (idx < attributes.length-1) %>,<% end %> <% end -%> }; <% end -%>
Version data entries
24 entries across 24 versions & 1 rubygems