Header.js
1.51 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
import React from "react";
import styled from "styled-components";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faComments } from "@fortawesome/free-solid-svg-icons";
const Header = styled.header`
display: block;
`;
const Nav = styled.nav`
height: 70px;
width: 100%;
position: fixed;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
`;
const HeaderBox = styled.div`
height: 100%;
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
margin: 0 auto;
`;
const HeaderTitleBox = styled.div`
display: flex;
height: 100%;
align-items: center;
svg {
font-size: 1.5rem;
}
`;
const HeaderTitle = styled.span`
font-size: 1.5rem;
`;
const HeaderMenuNav = styled.nav`
display: flex;
justify-content: flex-start;
`;
const HeaderMenuList = styled.ul`
display: flex;
`;
const HeaderMenuItem = styled.li`
&::before {
content: ${(props) => props.text};
}
`;
const StartBox = styled.div`
background-color: #1b1464;
color: #f1f2f6;
font-size: 20px;
`;
export default () => {
return (
<Header>
<Nav>
<HeaderBox>
<HeaderTitleBox>
<FontAwesomeIcon icon={faComments} />
<HeaderTitle>KhuChat</HeaderTitle>
</HeaderTitleBox>
<HeaderMenuNav>
<HeaderMenuList>
<HeaderMenuItem>About This</HeaderMenuItem>
</HeaderMenuList>
<StartBox>Start</StartBox>
</HeaderMenuNav>
</HeaderBox>
</Nav>
</Header>
);
};