Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-05-15 21:30:40 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6a496913ebbb50d8ea0e6cab68b1be9efe8029d7
6a496913
1 parent
796b60d5
create HomeCalendar component
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
96 additions
and
0 deletions
front/src/Components/Home/HomeCalendar.js
front/src/Components/Home/HomeCalendar.js
0 → 100644
View file @
6a49691
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>
);
};
Please
register
or
login
to post a comment