import React, { Component } from 'react';
import hocImmutable, { imShallowEqual } from '../../utils/HOC/hocImmutable';
import classnames from 'classnames';

export default hocImmutable(({ type, className = '', style, title, onClick, spin = false, attrs = [], ...props }) => {
    return <i {...props}
        className={classnames(className, `fa fa-${type} ${spin ? 'fa-spin' : ''} ${attrs.map(attr => 'fa-' + attr).join(' ')}`)}
        style={style}
        title={title}
        onClick={onClick}
    />
})