import React from 'react';
import classnames from 'classnames';

class Icon extends React.Component {
  render = () => {
    var className = null;

    if (this.props.icon.startsWith('icon-')) {
      className = classnames(this.props.icon, this.props.className);
      return <i className={className}></i>;
    }

    className = classnames('bt', 'bt-' + this.props.icon, this.props.className);
    return <i className={className} aria-hidden="true"></i>;

  }
}

export default Icon;
