-
Notifications
You must be signed in to change notification settings - Fork 0
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
3 changed files
with
96 additions
and
67 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,53 @@ | ||
import Box from '@mui/material/Box' | ||
import Button from '@mui/material/Button' | ||
import Card from '@mui/material/Card' | ||
import Grid from '@mui/material/Grid' | ||
import Typography from '@mui/material/Typography' | ||
|
||
import { concert } from 'config/concert' | ||
|
||
export const Timeline = ({ setActiveElement }) => ( | ||
<Box | ||
sx={{ | ||
position: 'relative', | ||
display: 'flex', | ||
backgroundColor: 'text.secondary', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
borderBottom: '8px solid black', | ||
overflow: 'auto', | ||
height: '106.04px', | ||
borderTopLeftRadius: '79.33px', | ||
borderTopRightRadius: '79.33px', | ||
paddingTop: '8px', | ||
px: '8px', | ||
}} | ||
> | ||
{concert.timeline.map(({ index, year }) => ( | ||
<Button | ||
key={index} | ||
onClick={() => setActiveElement(concert.timeline[index])} | ||
sx={{ | ||
color: 'text.primary', | ||
margin: 0.5, | ||
textTransform: 'none', | ||
borderRight: '2px solid black', | ||
borderRadius: 0, | ||
boxShadow: 'none', | ||
backgroundColor: 'transparent', | ||
'&:last-child': { | ||
borderRight: 'none', | ||
}, | ||
}} | ||
> | ||
<Typography component="p" variant="h4"> | ||
{year} | ||
</Typography> | ||
</Button> | ||
))} | ||
</Box> | ||
<Grid item xs={12}> | ||
<Card | ||
sx={{ | ||
display: 'flex', | ||
backgroundColor: 'text.secondary', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
borderBottom: '8px solid black', | ||
overflow: 'auto', | ||
height: '106.04px', | ||
borderTopLeftRadius: '79.33px', | ||
borderTopRightRadius: '79.33px', | ||
paddingTop: '8px', | ||
px: '8px', | ||
}} | ||
> | ||
<Grid container alignItems="center" justifyContent="center" textAlign="center"> | ||
{concert.timeline.map(({ index, year }) => ( | ||
<Box | ||
key={index} | ||
onClick={() => setActiveElement(concert.timeline[index])} | ||
sx={{ | ||
cursor: 'pointer', | ||
padding: '6px 8px', | ||
color: 'text.primary', | ||
margin: 0.5, | ||
textTransform: 'none', | ||
borderRight: '2px solid black', | ||
borderRadius: 0, | ||
boxShadow: 'none', | ||
backgroundColor: 'transparent', | ||
'&:last-child': { | ||
borderRight: 'none', | ||
}, | ||
}} | ||
> | ||
<Typography component="p" variant="h4"> | ||
{year} | ||
</Typography> | ||
</Box> | ||
))} | ||
</Grid> | ||
</Card> | ||
</Grid> | ||
) |