Showing
1 changed file
with
96 additions
and
0 deletions
front/src/Components/Home/HomeCalendar.js
0 → 100644
1 | +import React from "react"; | ||
2 | +import styled from "styled-components"; | ||
3 | +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||
4 | +import { faArrowLeft, faArrowRight } from "@fortawesome/free-solid-svg-icons"; | ||
5 | + | ||
6 | +const HomeCalendarWrapper = styled.div` | ||
7 | + display: flex; | ||
8 | + flex-direction: column; | ||
9 | + justify-content: center; | ||
10 | + align-items: center; | ||
11 | + height: 50%; | ||
12 | + width: 100%; | ||
13 | +`; | ||
14 | + | ||
15 | +const CalenderBox = styled.div` | ||
16 | + display: flex; | ||
17 | + flex-direction: column; | ||
18 | + justify-content: center; | ||
19 | + align-items: center; | ||
20 | + height: 100%; | ||
21 | + width: 100%; | ||
22 | + border: 1px solid; | ||
23 | +`; | ||
24 | + | ||
25 | +const CalenderMenuBox = styled.div` | ||
26 | + display: flex; | ||
27 | + flex-direction: row; | ||
28 | + justify-content: space-evenly; | ||
29 | + align-items: center; | ||
30 | + height: 15%; | ||
31 | + width: 100%; | ||
32 | + border: 1px solid; | ||
33 | +`; | ||
34 | + | ||
35 | +const DateInfoSpan = styled.span` | ||
36 | + font-size: 15px; | ||
37 | + font-family: "Kanit", sans-serif; | ||
38 | +`; | ||
39 | + | ||
40 | +const DateBodyBox = styled.div` | ||
41 | + height: 85%; | ||
42 | + width: 100%; | ||
43 | + display: flex; | ||
44 | + flex-direction: column; | ||
45 | + justify-content: center; | ||
46 | + align-items: center; | ||
47 | +`; | ||
48 | + | ||
49 | +const DateRow = styled.div` | ||
50 | + width: 100%; | ||
51 | + display: flex; | ||
52 | + flex-direction: row; | ||
53 | + justify-content: space-around; | ||
54 | +`; | ||
55 | + | ||
56 | +const DateText = styled.span` | ||
57 | + font-family: "Overpass", sans-serif; | ||
58 | + color: ${(props) => { | ||
59 | + if (props.className === "Sunday") return "#EA2027"; | ||
60 | + else if (props.className === "Saturday") return "#0652DD"; | ||
61 | + }}; | ||
62 | +`; | ||
63 | + | ||
64 | +export default () => { | ||
65 | + return ( | ||
66 | + <HomeCalendarWrapper> | ||
67 | + <CalenderBox> | ||
68 | + <CalenderMenuBox> | ||
69 | + <FontAwesomeIcon icon={faArrowLeft} /> | ||
70 | + <DateInfoSpan>May 2020</DateInfoSpan> | ||
71 | + <FontAwesomeIcon icon={faArrowRight} /> | ||
72 | + </CalenderMenuBox> | ||
73 | + <DateBodyBox> | ||
74 | + <DateRow> | ||
75 | + <DateText className="Sunday">SUN</DateText> | ||
76 | + <DateText>MON</DateText> | ||
77 | + <DateText>TUE</DateText> | ||
78 | + <DateText>WED</DateText> | ||
79 | + <DateText>THU</DateText> | ||
80 | + <DateText>FRI</DateText> | ||
81 | + <DateText className="Saturday">SAT</DateText> | ||
82 | + </DateRow> | ||
83 | + <DateRow> | ||
84 | + <DateText>26</DateText> | ||
85 | + <DateText>27</DateText> | ||
86 | + <DateText>28</DateText> | ||
87 | + <DateText>29</DateText> | ||
88 | + <DateText>30</DateText> | ||
89 | + <DateText>1</DateText> | ||
90 | + <DateText>2</DateText> | ||
91 | + </DateRow> | ||
92 | + </DateBodyBox> | ||
93 | + </CalenderBox> | ||
94 | + </HomeCalendarWrapper> | ||
95 | + ); | ||
96 | +}; |
-
Please register or login to post a comment