import React, {FC} from 'react'; import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; import { faUser, faCodeBranch, faGraduationCap, } from '@fortawesome/free-solid-svg-icons'; import {faConnectdevelop} from '@fortawesome/free-brands-svg-icons'; interface IProps { title: string; lead: string; icon?: string; } /** * Header component * @param title of the page * @param lead description of the content * @param icon to display (optional and default to faUser) */ const Header: FC = ({title, lead, icon = 'faUser'}) => { const RenderIcon = (icon: string) => { if (icon === 'faUser') { return ; } if (icon === 'connectdevelop') { return ; } if (icon === 'code-branch') { return ; } if (icon === 'graduation-cap') { return ; } }; return ( <>

{title}

{RenderIcon(icon)} {lead}

); }; export default Header;