-
Notifications
You must be signed in to change notification settings - Fork 5
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 #54 from CS3219-AY2425S1/ui-update
small ui update, try to fix socket again
- Loading branch information
Showing
5 changed files
with
109 additions
and
33 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 |
---|---|---|
@@ -1,37 +1,45 @@ | ||
import { useNavigate } from 'react-router-dom'; | ||
import Card from '@mui/material/Card'; | ||
import CardActions from '@mui/material/CardActions'; | ||
import CardContent from '@mui/material/CardContent'; | ||
import Button from '@mui/material/Button'; | ||
import Typography from '@mui/material/Typography'; | ||
|
||
export default function BasicCard({title, description, label, link}) { | ||
import { useNavigate } from "react-router-dom"; | ||
import Card from "@mui/material/Card"; | ||
import CardActions from "@mui/material/CardActions"; | ||
import CardContent from "@mui/material/CardContent"; | ||
import Button from "@mui/material/Button"; | ||
import Typography from "@mui/material/Typography"; | ||
|
||
export default function BasicCard({ title, description, label, link }) { | ||
const navigate = useNavigate(); | ||
|
||
const handleButtonClick = () => { | ||
navigate(link); | ||
} | ||
}; | ||
|
||
return ( | ||
<Card sx={{ minWidth: 275, flex: 0, borderRadius: '16px'}}> | ||
<CardContent> | ||
<Typography variant="h4" component="div" fontWeight="bold" padding="2px"> | ||
<Card | ||
sx={{ | ||
minWidth: 275, | ||
flex: "1 1 auto", | ||
display: "flex", | ||
flexDirection: "column", | ||
borderRadius: "16px" | ||
}} | ||
> | ||
<CardContent sx={{ border: "1px solid red", flex: "1 1 auto" }}> | ||
<Typography | ||
variant="h4" | ||
component="div" | ||
fontWeight="bold" | ||
padding="2px" | ||
> | ||
{title} | ||
</Typography> | ||
<Typography variant="body2" paddingTop="6px"> | ||
{description} | ||
</Typography> | ||
</CardContent> | ||
<CardActions sx={{ justifyContent: 'center'}}> | ||
<Button | ||
size="small" | ||
variant="outlined" | ||
onClick={handleButtonClick} | ||
> | ||
<CardActions sx={{ justifyContent: "center", border: "1px solid red" }}> | ||
<Button size="small" variant="outlined" onClick={handleButtonClick}> | ||
{label} | ||
</Button> | ||
</CardActions> | ||
</Card> | ||
); | ||
} | ||
} |
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
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