-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from csesoc/CHAOS-8-campaign-card
Chaos 8 campaign card
- Loading branch information
Showing
7 changed files
with
97 additions
and
4 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
frontend/src/components/CampaignCard/campaignCard.styled.js
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,11 @@ | ||
// import { styled } from "@mui/material/styles"; | ||
// import { Typography } from "@mui/material/"; | ||
|
||
// export const BoldTitle = styled(Typography)` | ||
// font-weight: 600; | ||
// color: ${(props) => props.theme.palette.secondary.light}; | ||
// `; | ||
|
||
// export const Subtitle = styled(Typography)` | ||
// color: ${(props) => props.theme.palette.primary.light}; | ||
// `; |
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,38 @@ | ||
import React, { useState } from "react"; | ||
import PropTypes from 'prop-types'; | ||
import { Button, Card, CardContent, CardActions, CardMedia, Typography } from "@mui/material"; | ||
|
||
const CampaignCard = (props) => { | ||
const { title, description, startDate, endDate, img } = props; | ||
|
||
return ( | ||
<Card sx={{ maxWidth: 275 }}> | ||
<CardMedia | ||
component="img" | ||
height="140" | ||
image={img} | ||
alt={`campaign cover for ${title}`} | ||
/> | ||
<CardContent> | ||
<Typography variant="h5" component="div"> | ||
{title} | ||
</Typography> | ||
<Typography sx={{ mb: 1.5 }} color="text.secondary"> | ||
{`${startDate} - ${endDate}`} | ||
</Typography> | ||
</CardContent> | ||
<CardActions> | ||
<Button size="small">Apply</Button> | ||
|
||
</CardActions> | ||
</Card> | ||
); | ||
}; | ||
|
||
CampaignCard.propTypes = { | ||
title: PropTypes.string, | ||
description: PropTypes.string, | ||
img: PropTypes.string, | ||
}; | ||
|
||
export default CampaignCard; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,4 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|