UNPKG

apeman-react-icon

Version:
52 lines (38 loc) 792 B
/** * Icon for font awesome. * @class ApFaIcon */ 'use strict' 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