-
-
Notifications
You must be signed in to change notification settings - Fork 268
Expand file tree
/
Copy pathFeaturedJobItem.tsx
More file actions
85 lines (79 loc) · 2.17 KB
/
FeaturedJobItem.tsx
File metadata and controls
85 lines (79 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import OutboundLink from 'components/OutboundLink/OutboundLink';
import BuildingIcon from 'static/images/icons/FontAwesome/building_icon.svg';
import CloudUploadIcon from 'static/images/icons/FontAwesome/cloud_upload_icon.svg';
import MapMarkerIcon from 'static/images/icons/FontAwesome/map_marker_icon.svg';
export interface FeaturedJobItemPropsType {
/**
* Title of the feautured job item.
*/
title: string;
/**
* Description of the featured job item.
*/
description: string;
/**
* Source of the featured job item.
*/
source: string;
/**
* Url for the source of the featured job item.
*/
sourceUrl: string;
/**
* Applies an optional state for the featured job.
*/
city?: string;
/**
* Applies an optional state for the featured job.
*/
state?: string;
/**
* Applies an optional country for the featured job.
*/
country?: string;
/**
* Applies an indicator that the featured job is remote.
* @default false
*/
remote?: boolean;
}
function FeaturedJobItem({
title,
source,
sourceUrl,
city,
state,
country,
description,
remote = false,
}: FeaturedJobItemPropsType) {
return (
<article>
<OutboundLink href={sourceUrl} analyticsEventLabel={`Featured Job ${source}`}>
<h5>{title}</h5>
</OutboundLink>
<div className="flex flex-wrap gap-4 text-lg text-secondary/75">
<div className="flex items-center gap-0.5">
<BuildingIcon className="fill-secondary size-4" />
<span className="ml-1">{source}</span>
</div>
<div className="flex items-center gap-0.5">
<MapMarkerIcon className="fill-secondary size-4" />
<address className="inline-flex gap-1">
{city && <span>{city},</span>}
{state && <span>{state},</span>}
{country && <span>{country}</span>}
</address>
</div>
{remote && (
<div className="flex items-center gap-1">
<CloudUploadIcon className="fill-secondary size-4" />
<span>Remote</span>
</div>
)}
</div>
<p className="m-0">{description}</p>
</article>
);
}
export default FeaturedJobItem;