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