apeman-react-list
Version:
apeman react package for list component.
59 lines (46 loc) • 1.06 kB
JSX
/**
* List item arrow icon component.
* @class ApListItemArrowIcon
*/
import React, {PropTypes as types} from 'react'
import classnames from 'classnames'
import ApListItemIcon from './ap_list_item_icon'
import {ApPureMixin} from 'apeman-react-mixin-pure'
/** @lends ApListItemArrowIcon */
const ApListItemArrowIcon = React.createClass({
// --------------------
// Specs
// --------------------
propTypes: {
direction: types.oneOf([
'up',
'down',
'right',
'left'
])
},
mixins: [
ApPureMixin
],
statics: {},
getInitialState () {
return {}
},
getDefaultProps () {
return {
direction: 'right'
}
},
render () {
const s = this
let { props } = s
let className = classnames('ap-list-item-arrow-icon', `fa fa-angle-${props.direction}`, props.className)
return (
<ApListItemIcon className={ className }
style={ Object.assign({}, props.style) }>
</ApListItemIcon>
)
}
})
export default ApListItemArrowIcon