sdy

update Header Component

1 import React from "react"; 1 import React from "react";
2 import styled from "styled-components"; 2 import styled from "styled-components";
3 +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
4 +import { faComments, faSignOutAlt } from "@fortawesome/free-solid-svg-icons";
3 5
4 -const HeaderContainer = styled.div``; 6 +const HeaderContainer = styled.div`
7 + display: flex;
8 + flex-direction: row;
9 + justify-content: space-between;
10 + width: 100%;
11 + position: fixed;
12 + top: 0;
13 + svg {
14 + font-size: 30px;
15 + }
16 + box-shadow: 1px 1px 20px #8395a7;
17 + background-color: #667aff;
18 +`;
5 19
6 -const HeaderTitle = styled.span``; 20 +const TitleBox = styled.div`
21 + display: flex;
22 + flex-direction: row;
23 + padding: 20px 10px;
24 + color: white;
25 + svg {
26 + margin-right: 5px;
27 + opacity: 0.7;
28 + }
29 +`;
30 +
31 +const HeaderSpan = styled.span`
32 + font-family: "Raleway", sans-serif;
33 + font-size: 30px;
34 +`;
7 35
8 export default ({ text }) => { 36 export default ({ text }) => {
9 return ( 37 return (
10 <HeaderContainer> 38 <HeaderContainer>
11 - <HeaderTitle>{text}</HeaderTitle> 39 + <TitleBox>
40 + <FontAwesomeIcon icon={faComments} />
41 + <HeaderSpan>{text}</HeaderSpan>
42 + </TitleBox>
43 + <TitleBox>
44 + <FontAwesomeIcon icon={faSignOutAlt} />
45 + </TitleBox>
12 </HeaderContainer> 46 </HeaderContainer>
13 ); 47 );
14 }; 48 };
......