@@ -11,16 +11,16 @@ class ComponentGenerator < ::Rails::Generators::NamedBase
1111 Available field types:
1212
1313 Basic prop types do not take any additional arguments. If you do not specify
14- a prop type, the generic renderable will be used. The basic types available are:
14+ a prop type, the generic node will be used. The basic types available are:
1515
1616 any
1717 array
1818 bool
19- component
19+ element
2020 func
2121 number
2222 object
23- renderable
23+ node
2424 shape
2525 string
2626
@@ -51,15 +51,15 @@ class ComponentGenerator < ::Rails::Generators::NamedBase
5151 :banner => "field[:type] field[:type] ..."
5252
5353 REACT_PROP_TYPES = {
54- "renderable " => 'React.PropTypes.renderable ' ,
54+ "node " => 'React.PropTypes.node ' ,
5555 "bool" => 'React.PropTypes.bool' ,
5656 "boolean" => 'React.PropTypes.bool' ,
5757 "string" => 'React.PropTypes.string' ,
5858 "number" => 'React.PropTypes.number' ,
5959 "object" => 'React.PropTypes.object' ,
6060 "array" => 'React.PropTypes.array' ,
6161 "shape" => 'React.PropTypes.shape({})' ,
62- "component " => 'React.PropTypes.component ' ,
62+ "element " => 'React.PropTypes.element ' ,
6363 "func" => 'React.PropTypes.func' ,
6464 "function" => 'React.PropTypes.func' ,
6565 "any" => 'React.PropTypes.any' ,
@@ -103,13 +103,13 @@ def parse_attributes!
103103 end
104104 end
105105
106- def self . lookup ( type = "renderable " , options = "" )
106+ def self . lookup ( type = "node " , options = "" )
107107 react_prop_type = REACT_PROP_TYPES [ type ]
108108 if react_prop_type . blank?
109109 if type =~ /^[[:upper:]]/
110110 react_prop_type = REACT_PROP_TYPES [ 'instanceOf' ]
111111 else
112- react_prop_type = REACT_PROP_TYPES [ 'renderable ' ]
112+ react_prop_type = REACT_PROP_TYPES [ 'node ' ]
113113 end
114114 end
115115
@@ -119,7 +119,7 @@ def self.lookup(type = "renderable", options = "")
119119 react_prop_type
120120 end
121121
122- def lookup ( type = "renderable " , options = "" )
122+ def lookup ( type = "node " , options = "" )
123123 self . class . lookup ( type , options )
124124 end
125125 end
0 commit comments