1
- import React from 'react'
1
+ var React = require ( 'react' )
2
2
3
- export default React . createClass ( {
3
+ module . exports = React . createClass ( {
4
4
5
5
propTypes : {
6
6
name : React . PropTypes . string . isRequired ,
7
- size : React . PropTypes . oneOf ( [ 'lg ' , '2x' , '3x' , '4x' , '5x' ] ) ,
7
+ size : React . PropTypes . oneOf ( [ '1x ' , '2x' , '3x' , '4x' , '5x' ] ) ,
8
8
spin : React . PropTypes . bool ,
9
9
pulse : React . PropTypes . bool ,
10
10
border : React . PropTypes . bool ,
@@ -15,11 +15,11 @@ export default React.createClass({
15
15
stack : React . PropTypes . oneOf ( [ '1x' , '2x' ] )
16
16
} ,
17
17
18
- render ( ) {
19
- var className = ` fa fa-${ this . props . name } `
18
+ render : function ( ) {
19
+ var className = ' fa fa-' + this . props . name
20
20
21
21
if ( this . props . size ) {
22
- className += ` fa-${ this . props . size } `
22
+ className += ' fa-' + this . props . size
23
23
}
24
24
25
25
if ( this . props . spin ) {
@@ -43,21 +43,24 @@ export default React.createClass({
43
43
}
44
44
45
45
if ( this . props . flip ) {
46
- className += ` fa-flip-${ this . props . flip } `
46
+ className += ' fa-flip-' + this . props . flip
47
47
}
48
48
49
49
if ( this . props . rotate ) {
50
- className += ` fa-rotate-${ this . props . rotate } `
50
+ className += ' fa-rotate-' + this . props . rotate
51
51
}
52
52
53
53
if ( this . props . stack ) {
54
- className += ` fa-stack-${ this . props . stack } `
54
+ className += ' fa-stack-' + this . props . stack
55
55
}
56
56
57
57
if ( this . props . className ) {
58
- className += ` ${ this . props . className } `
58
+ className += ' ' + this . props . className
59
59
}
60
60
61
- return < span { ...this . props } className = { className } />
61
+ var props = this . props ;
62
+ props . className = className ;
63
+
64
+ return React . createElement ( 'span' , props )
62
65
}
63
66
} )
0 commit comments