-
Notifications
You must be signed in to change notification settings - Fork 3
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 #59 from nolanblakethompson/UI-edits
UI edits
- Loading branch information
Showing
33 changed files
with
1,500 additions
and
146 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
"extends": "next/core-web-vitals", | ||
"rules": { | ||
"@next/next/no-img-element": "off" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,78 @@ | ||
import React from 'react'; | ||
import { Card, CardContent, CardMedia, Typography, CardActions } from '@mui/material'; | ||
import ButtonFill from './ButtonFill'; | ||
|
||
interface CustomCardProps { | ||
image: string; | ||
title?: string; | ||
description: string; | ||
buttonText: string; | ||
buttonLink: string; | ||
className?: string; | ||
disableTitle?: boolean; | ||
variant?: 'primary' | 'secondary' | 'custom'; | ||
customBgColor?: string; | ||
} | ||
|
||
const CustomCard: React.FC<CustomCardProps> = ({ | ||
image, | ||
title, | ||
description, | ||
buttonText, | ||
buttonLink, | ||
className, | ||
disableTitle = false, | ||
variant = 'primary', // Default variant | ||
customBgColor, | ||
}) => { | ||
|
||
|
||
|
||
let bgColor; | ||
switch (variant) { | ||
case 'primary': | ||
bgColor = '#ede9fe'; | ||
break; | ||
case 'secondary': | ||
bgColor = '#ddd6fe'; | ||
break; | ||
case 'custom': | ||
bgColor = customBgColor || '#ffffff'; | ||
break; | ||
default: | ||
bgColor = '#ffffff'; | ||
} | ||
|
||
return ( | ||
<Card sx={{ width: '100%', maxWidth: 600, maxHeight: 600, backgroundColor: bgColor }}> | ||
<CardMedia | ||
component="img" | ||
height="140" | ||
image={image} | ||
alt={title} | ||
/> | ||
|
||
<CardContent> | ||
{!disableTitle && title && ( | ||
<Typography gutterBottom variant="h5" component="div"> | ||
{title} | ||
</Typography> | ||
)} | ||
<Typography variant="body2" color="#172554"> | ||
{description} | ||
</Typography> | ||
|
||
</CardContent> | ||
<CardActions sx={{ justifyContent: 'flex-end' }}> | ||
<ButtonFill | ||
name={buttonText} | ||
link={buttonLink} | ||
className={className || ''} | ||
variant="text" | ||
/> | ||
</CardActions> | ||
</Card> | ||
); | ||
} | ||
|
||
export default CustomCard; |
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
Oops, something went wrong.