Sha256: 529a6e5382a128b1b130912a720e227282c48422d95fa141a3ea81fa90973ea3

Contents?: true

Size: 489 Bytes

Versions: 17

Compression:

Stored size: 489 Bytes

Contents

class @<%= file_name.camelize %> extends React.Component
<% if attributes.size > 0 -%>
  @propTypes =
<% attributes.each do |attribute| -%>
    <%= attribute[:name].camelize(:lower) %>: <%= attribute[:type] %>
<% end -%>

<% end -%>
  render: ->
<% if attributes.size > 0 -%>
    `<div>
<% attributes.each do |attribute| -%>
      <div><%= attribute[:name].titleize %>: {this.props.<%= attribute[:name].camelize(:lower) %>}</div>
<% end -%>
    </div>`
<% else -%>
    `<div />`
<% end -%>

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
react-rails-2.1.0 lib/generators/templates/component.js.jsx.coffee
react-rails-2.0.2 lib/generators/templates/component.js.jsx.coffee
react-rails-2.0.0 lib/generators/templates/component.js.jsx.coffee
react-rails-1.11.0 lib/generators/templates/component.js.jsx.coffee
react-rails-1.10.0 lib/generators/templates/component.js.jsx.coffee
react-rails-1.9.0 lib/generators/templates/component.js.jsx.coffee
react-rails-1.8.2 lib/generators/templates/component.js.jsx.coffee
react-rails-1.8.1 lib/generators/templates/component.js.jsx.coffee
react-rails-1.8.0 lib/generators/templates/component.js.jsx.coffee
react-rails-1.7.2 lib/generators/templates/component.js.jsx.coffee
react-rails-1.7.1 lib/generators/templates/component.js.jsx.coffee
react-rails-1.7.0 lib/generators/templates/component.js.jsx.coffee
react-rails-1.6.2 lib/generators/templates/component.js.jsx.coffee
react-rails-1.6.1 lib/generators/templates/component.js.jsx.coffee
react-rails-1.6.0 lib/generators/templates/component.js.jsx.coffee
react-rails-1.5.0 lib/generators/templates/component.js.jsx.coffee
react-rails-1.4.2 lib/generators/templates/component.js.jsx.coffee