import React, { PureComponent } from 'react'

export class CustomIcon extends PureComponent {
    render() {
        const size = this.props.size === undefined ? 'md' : this.props.size;
        const className = this.props.className === undefined ? '' : this.props.className;
        return (
            <svg
                className={` ${className} am-icon am-icon-${this.props.type.default.id} am-icon-${size}`}
                {...this.props.restProps}
            >
                <use xlinkHref={`#${this.props.type.default.id}`} />
            </svg>
        )
    }
}

export default CustomIcon
