MetaPhase-Consulting/State-TalentMAP

View on GitHub
src/Components/ProfileSectionTitle/ProfileSectionTitle.jsx

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import PropTypes from 'prop-types';
import FontAwesome from 'react-fontawesome';

const ProfileSectionTitle = ({ title, icon, className }) => (
  <h2 className={`usa-grid-full hello-greeting ${className}`}>
    {icon && <FontAwesome size="lg" name={icon} />}
    {title}
  </h2>
);

ProfileSectionTitle.propTypes = {
  title: PropTypes.string.isRequired,
  icon: PropTypes.string,
  className: PropTypes.string,
};

ProfileSectionTitle.defaultProps = {
  icon: '',
  className: '',
};

export default ProfileSectionTitle;