import React, { PropTypes } from 'react'
import styles from './index.css'

const propTypes = {
  className: PropTypes.string,
  title: PropTypes.string,
  image: PropTypes.string,
}

const defaultProps = {
  className: '',
}

const TabBarItem = ({ className, image, title, ...other }) =>
  <figure {...other} className={`${styles.tabBarItem} ${className}`}>
    <img src={image} />
    <figcaption>{title}</figcaption>
  </figure>

TabBarItem.propTypes = propTypes
TabBarItem.defaultProps = defaultProps

export default TabBarItem
