2017-12-24 08:16:45 +02:00
|
|
|
import React from 'react';
|
2019-09-09 16:28:45 +03:00
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import classNames from 'classnames';
|
2017-12-24 08:16:45 +02:00
|
|
|
|
2019-09-09 16:28:45 +03:00
|
|
|
export default class Icon extends React.PureComponent {
|
2017-12-24 08:16:45 +02:00
|
|
|
|
2019-09-09 16:28:45 +03:00
|
|
|
static propTypes = {
|
|
|
|
id: PropTypes.string.isRequired,
|
|
|
|
className: PropTypes.string,
|
|
|
|
fixedWidth: PropTypes.bool,
|
|
|
|
};
|
|
|
|
|
|
|
|
render () {
|
|
|
|
const { id, className, fixedWidth, ...other } = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<i role='img' className={classNames('fa', `fa-${id}`, className, { 'fa-fw': fixedWidth })} {...other} />
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|