import React from 'react'; import PureRenderMixin from 'react-addons-pure-render-mixin'; import style from './style'; import FontIcon from '../font_icon'; export default React.createClass({ mixins: [PureRenderMixin], displayName: 'Link', propTypes: { label: React.PropTypes.string, className: React.PropTypes.string, count: React.PropTypes.number, icon: React.PropTypes.string, onClick: React.PropTypes.func, route: React.PropTypes.string }, getDefaultProps () { return { attributes: '', className: '' }; }, onClick (event) { if (this.props.onClick) { this.props.onClick(event, this); } }, render () { return ( { this.props.icon ? : null } { this.props.label ? {this.props.label} : null } { this.props.count && parseInt(this.props.count) !== 0 ? {this.props.count} : null} ); } });