-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHeader.js
More file actions
67 lines (60 loc) · 1.54 KB
/
Copy pathHeader.js
File metadata and controls
67 lines (60 loc) · 1.54 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
import React from 'react';
import styled from 'styled-components';
import Grid from '@mui/material/Grid';
import backArrowIcon from '../../../assets/svg/recruitment/back-arrow.svg';
const Container = styled.div`
margin: 0;
`;
const BackArrow = styled.button`
background: url(${backArrowIcon});
color: inherit;
border: none;
padding: 5;
font: inherit;
cursor: pointer;
outline: inherit;
position: absolute;
z-index: 2;
top: 5rem;
left: 1rem;
width: 1rem;
height: 1rem;
margin: 1rem 0;
`;
const HeaderGrid = styled(Grid)`
width: 100%;
position: relative;
overflow: auto;
z-index: 1;
padding: 64px 82px 10px 82px;
background-color: #a3f4e4;
background-image: ${({ blobs }) => `url(${blobs})`},
${({ background }) => background};
background-size: cover;
background-position: center;
`;
const Name = styled.h1`
font: ${({ theme }) => theme.fonts.bold48};
`;
const DemographicText = styled.p`
font: ${({ theme }) => theme.fonts.medium20};
`;
// name is a string, current postings is an array of strings containing names of postings, blobs is the file path to an svg
const Header = ({
name,
currentPostings,
background,
blobs,
handleBackClick,
}) => (
<Container>
<BackArrow onClick={() => handleBackClick()} />
<HeaderGrid item xs={12} background={background} blobs={blobs}>
<Name>{name}</Name>
{currentPostings && currentPostings.length > 0 && (
<DemographicText>{currentPostings.join(' | ')}</DemographicText>
)}
</HeaderGrid>
</Container>
);
export default Header;