Sha256: 81ff23e8d4a2b30d3503461aa700efec710f5696b4118744e1ef3f12b09ee4cc
Contents?: true
Size: 544 Bytes
Versions: 5
Compression:
Stored size: 544 Bytes
Contents
<%= file_header %> const <%= 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