-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
157 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import * as React from 'react'; | ||
import { StyledDay, StyledEvent, StyledWrapper } from './styled'; | ||
|
||
interface IProps { | ||
title: string; | ||
events: Array<{ | ||
title: string; | ||
day: number; | ||
start: number; | ||
end: number; | ||
}>; | ||
} | ||
|
||
export default (props: IProps) => { | ||
return ( | ||
<StyledWrapper> | ||
<StyledDay style={{fontSize: '1.2em', gridRowStart: 1, gridColumnStart: 1, gridColumnEnd: 5}}> | ||
{props.title} | ||
</StyledDay> | ||
<StyledDay style={{gridRowStart: 2, gridColumnStart: 1}}> | ||
Tuesday Sept 5th | ||
</StyledDay> | ||
<StyledDay style={{gridRowStart: 2, gridColumnStart: 2}}> | ||
Wednesday Sept 6th | ||
</StyledDay> | ||
<StyledDay style={{gridRowStart: 2, gridColumnStart: 3}}> | ||
Thursday Sept 7th | ||
</StyledDay> | ||
<StyledDay style={{gridRowStart: 2, gridColumnStart: 4}}> | ||
Friday Sept 8th | ||
</StyledDay> | ||
{props.events.map((element) => ( | ||
<StyledEvent key={element.title} style={{gridRowStart: element.start * 2 - 13, gridRowEnd: element.end * 2 - 13, gridColumnStart: element.day - 1}}> | ||
{element.title} | ||
</StyledEvent> | ||
))} | ||
</StyledWrapper> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const StyledWrapper = styled.div` | ||
width: 100%; | ||
height: 550px; | ||
display: grid; | ||
grid-template-columns: repeat(4, 1fr); | ||
grid-template-rows: 48px 48px repeat(28, 1fr); | ||
grid-gap: 4px; | ||
font-family: 'Fjalla One', sans-serif; | ||
` | ||
|
||
export const StyledDay = styled.div` | ||
font-size: 1em; | ||
color: white; | ||
text-align: center; | ||
text-transform: uppercase; | ||
` | ||
|
||
export const StyledEvent = styled.div` | ||
display: flex; | ||
font-size: 0.8em; | ||
justify-content: center; | ||
align-items: center; | ||
background: white; | ||
border-radius: 4px; | ||
box-shadow: rgba(0,0,0,0.4) 0 0 8px; | ||
color: #E51E25; | ||
text-align: center; | ||
cursor: pointer; | ||
&:hover { | ||
background: #FAFAFA; | ||
} | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters