|
| 1 | +import React from 'react'; |
| 2 | +import PropTypes from 'prop-types'; |
| 3 | +import FontAwesomeIcon from '@fortawesome/react-fontawesome'; |
| 4 | +import { faMapMarkerAlt, faBuilding, faCloudUploadAlt } from '@fortawesome/fontawesome-free-solid'; |
| 5 | +import OutboundLink from 'shared/components/outboundLink/outboundLink'; |
| 6 | +import styles from './featuredJob.css'; |
| 7 | + |
| 8 | +const FeaturedJob = ({ |
| 9 | + title, |
| 10 | + source, |
| 11 | + sourceUrl, |
| 12 | + city, |
| 13 | + state, |
| 14 | + country, |
| 15 | + description, |
| 16 | + remote |
| 17 | +}) => ( |
| 18 | + <div> |
| 19 | + <div className={styles.job}> |
| 20 | + <div> |
| 21 | + <OutboundLink href={sourceUrl} analyticsEventLabel={`[FeaturedJob] ${sourceUrl}`}> |
| 22 | + <span className={styles.link}>{title}</span> |
| 23 | + </OutboundLink> |
| 24 | + </div> |
| 25 | + <div className={styles.details}> |
| 26 | + <div className={styles.detailsContainer}> |
| 27 | + <FontAwesomeIcon icon={faBuilding} size="sm" style={{ color: '#afafaf' }} /> |
| 28 | + <span className={styles.detail}>{source}</span> |
| 29 | + </div> |
| 30 | + <div className={styles.detailsContainer}> |
| 31 | + <FontAwesomeIcon icon={faMapMarkerAlt} size="sm" style={{ color: '#afafaf' }} /> |
| 32 | + {city && <span className={styles.detail}>{city},</span>} |
| 33 | + {state && <span className={styles.detail}>{state},</span>} |
| 34 | + {country && <span className={styles.detail}>{country}</span>} |
| 35 | + </div> |
| 36 | + {remote && |
| 37 | + <div className={styles.detailsContainer}> |
| 38 | + <FontAwesomeIcon icon={faCloudUploadAlt} size="sm" style={{ color: '#afafaf' }} /> |
| 39 | + <span className={styles.remote}>Remote</span> |
| 40 | + </div> |
| 41 | + } |
| 42 | + </div> |
| 43 | + <div className={styles.description}> |
| 44 | + {description} |
| 45 | + </div> |
| 46 | + </div> |
| 47 | + </div > |
| 48 | +); |
| 49 | + |
| 50 | +FeaturedJob.propTypes = { |
| 51 | + title: PropTypes.string.isRequired, |
| 52 | + source: PropTypes.string.isRequired, |
| 53 | + sourceUrl: PropTypes.string.isRequired, |
| 54 | + city: PropTypes.string.isRequired, |
| 55 | + state: PropTypes.string.isRequired, |
| 56 | + country: PropTypes.string.isRequired, |
| 57 | + description: PropTypes.string.isRequired, |
| 58 | + remote: PropTypes.bool |
| 59 | +}; |
| 60 | + |
| 61 | +FeaturedJob.defaultProps = { |
| 62 | + remote: false |
| 63 | +}; |
| 64 | + |
| 65 | +export default FeaturedJob; |
0 commit comments