import PropTypes from 'prop-types'; import React from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { kinds } from 'Helpers/Props'; import classNames from 'classnames'; import styles from './Icon.css'; function Icon(props) { const { containerClassName, className, name, kind, size, title, isSpinning, ...otherProps } = props; const icon = ( ); if (title) { return ( {icon} ); } return icon; } Icon.propTypes = { containerClassName: PropTypes.string, className: PropTypes.string, name: PropTypes.object.isRequired, kind: PropTypes.string.isRequired, size: PropTypes.number.isRequired, title: PropTypes.string, isSpinning: PropTypes.bool.isRequired, fixedWidth: PropTypes.bool.isRequired }; Icon.defaultProps = { kind: kinds.DEFAULT, size: 14, isSpinning: false, fixedWidth: false }; export default Icon;