components/TeacherMenu/TeacherMenuItem/TeacherMenuItem.jsx

/**
 * Элемент меню в меню учителя
 * @module TeacherMenuItem
 * @author Ihor Bielchenko
 * @requires react
 * @requires react#Component
 * @requires components/Common/Link.jsx
 */

import React, { Component } from 'react';
import Link from '../../Common/Link.jsx';

/**
 * Элемент меню в меню учителя
 * @extends Component
 * @property {string} href Ссылка на ресурс
 * @property {string} icon Иконка элемента меню
 * @property {string} title Текст элемета меню
 */
class TeacherMenuItem extends Component {

	static defaultProps = {
		onClick: function() {}
	}

	/**
	 * Render component
	 * @return {Object} jsx object
	 */
	render() {
		return <Link href={this.props.href}
					onClick={this.props.onClick.bind(this)}>
				<img src={this.props.icon} alt={this.props.title} />{this.props.title}</Link>
	}
}

export default TeacherMenuItem;