UNPKG

799 BJSXView Raw
1/**
2 * Icon for font awesome.
3 * @class ApIonIcon
4 */
5
6'use strict'
7
8import React, {PropTypes as types} from 'react'
9import classnames from 'classnames'
10import ApIcon from './ap_icon'
11
12/** @lends ApIonIcon */
13const ApIonIcon = React.createClass({
14
15 // --------------------
16 // Specs
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
51export default ApIonIcon