1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | 'use strict'
|
7 |
|
8 | import React, {PropTypes as types} from 'react'
|
9 | import classnames from 'classnames'
|
10 |
|
11 | import ApIcon from './ap_icon'
|
12 |
|
13 |
|
14 | const ApFaIcon = React.createClass({
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | propTypes: {
|
21 | type: types.string.isRequired
|
22 | },
|
23 |
|
24 | mixins: [],
|
25 |
|
26 | statics: {},
|
27 |
|
28 | getInitialState () {
|
29 | return {}
|
30 | },
|
31 |
|
32 | getDefaultProps () {
|
33 | return {
|
34 | type: null
|
35 | }
|
36 | },
|
37 |
|
38 | render () {
|
39 | const s = this
|
40 | let { props } = s
|
41 | return (
|
42 | <ApIcon className={ classnames('ap-fa-icon', 'fa', props.className,
|
43 | `fa-${props.type}`) }
|
44 | style={ Object.assign({}, props.style) }>
|
45 | </ApIcon>
|
46 | )
|
47 | }
|
48 |
|
49 | })
|
50 |
|
51 | export default ApFaIcon
|