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