Sha256: abde9242e7a75aca82ec267bb9e9e2120c4db8db46e98239263c5da2d87e6918
Contents?: true
Size: 542 Bytes
Versions: 5
Compression:
Stored size: 542 Bytes
Contents
<%= file_header %> function <%= component_name %>(props) { return ( <React.Fragment> <% attributes.each do |attribute| -%> <%= attribute[:name].titleize %>: {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
5 entries across 5 versions & 1 rubygems