HomeCalendar.js
2.3 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
86
87
88
89
90
91
92
93
94
95
96
import React from "react";
import styled from "styled-components";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faArrowLeft, faArrowRight } from "@fortawesome/free-solid-svg-icons";
const HomeCalendarWrapper = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 50%;
width: 100%;
`;
const CalenderBox = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100%;
width: 100%;
border: 1px solid;
`;
const CalenderMenuBox = styled.div`
display: flex;
flex-direction: row;
justify-content: space-evenly;
align-items: center;
height: 15%;
width: 100%;
border: 1px solid;
`;
const DateInfoSpan = styled.span`
font-size: 15px;
font-family: "Kanit", sans-serif;
`;
const DateBodyBox = styled.div`
height: 85%;
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
`;
const DateRow = styled.div`
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-around;
`;
const DateText = styled.span`
font-family: "Overpass", sans-serif;
color: ${(props) => {
if (props.className === "Sunday") return "#EA2027";
else if (props.className === "Saturday") return "#0652DD";
}};
`;
export default () => {
return (
<HomeCalendarWrapper>
<CalenderBox>
<CalenderMenuBox>
<FontAwesomeIcon icon={faArrowLeft} />
<DateInfoSpan>May 2020</DateInfoSpan>
<FontAwesomeIcon icon={faArrowRight} />
</CalenderMenuBox>
<DateBodyBox>
<DateRow>
<DateText className="Sunday">SUN</DateText>
<DateText>MON</DateText>
<DateText>TUE</DateText>
<DateText>WED</DateText>
<DateText>THU</DateText>
<DateText>FRI</DateText>
<DateText className="Saturday">SAT</DateText>
</DateRow>
<DateRow>
<DateText>26</DateText>
<DateText>27</DateText>
<DateText>28</DateText>
<DateText>29</DateText>
<DateText>30</DateText>
<DateText>1</DateText>
<DateText>2</DateText>
</DateRow>
</DateBodyBox>
</CalenderBox>
</HomeCalendarWrapper>
);
};