Header.js
1 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
import React from "react";
import styled from "styled-components";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faComments, faSignOutAlt } from "@fortawesome/free-solid-svg-icons";
const HeaderContainer = styled.div`
display: flex;
flex-direction: row;
justify-content: space-between;
width: 100%;
position: fixed;
top: 0;
svg {
font-size: 30px;
}
box-shadow: 1px 1px 20px #8395a7;
background-color: #667aff;
`;
const TitleBox = styled.div`
display: flex;
flex-direction: row;
padding: 20px 10px;
color: white;
svg {
margin-right: 5px;
opacity: 0.7;
}
`;
const HeaderSpan = styled.span`
font-family: "Raleway", sans-serif;
font-size: 30px;
`;
export default ({ text }) => {
return (
<HeaderContainer>
<TitleBox>
<FontAwesomeIcon icon={faComments} />
<HeaderSpan>{text}</HeaderSpan>
</TitleBox>
<TitleBox>
<FontAwesomeIcon icon={faSignOutAlt} />
</TitleBox>
</HeaderContainer>
);
};