/**
 * imui.Icon
 * @author lonnyhuang
 * @date 2016-07-29
 */
import React, { PureComponent } from 'react';
import classnames from 'classnames';
import PropTypes from 'prop-types';
// @require './style/index.scss'

export default class Icon extends PureComponent {

  static propTypes = {
    type: PropTypes.string,
    className: PropTypes.string,
  };

  render() {
    const {
      type,
      className,
      ...other
    } = this.props;

    const cls = classnames('im-icon icon-font', className, {
      [`i-${type}`]: true,
    });
    return (
      <span
        {...other}
        className={cls}
      />
    );
  }
}
