apeman-react-icon
Version:
apeman react package for icon components.
52 lines (38 loc) • 792 B
JSX
/**
* Icon for font awesome.
* @class ApFaIcon
*/
import React, {PropTypes as types} from 'react'
import classnames from 'classnames'
import ApIcon from './ap_icon'
/** @lends ApFaIcon */
const ApFaIcon = React.createClass({
// --------------------
// Specs
// --------------------
propTypes: {
type: types.string.isRequired
},
mixins: [],
statics: {},
getInitialState () {
return {}
},
getDefaultProps () {
return {
type: null
}
},
render () {
const s = this
let { props } = s
return (
<ApIcon className={ classnames('ap-fa-icon', 'fa', props.className,
`fa-${props.type}`) }
style={ Object.assign({}, props.style) }>
</ApIcon>
)
}
})
export default ApFaIcon