Update CardLandscape
This commit is contained in:
3 files changed
+17
-36
No files matched your search
@@ -16,17 +16,8 @@ import {
|
||||
import "./card.module.scss";
|
||||
|
||||
export const CardLandscape = ({ itemName, itemId, imageTags, iconType }) => {
|
||||
const imageAvailable = () => {
|
||||
if (imageTags == {}) {
|
||||
return false;
|
||||
} else {
|
||||
console.log("hee");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
console.log(!!imageTags.Primary);
|
||||
return (
|
||||
<Card className="card landscape">
|
||||
<Card className="card landscape" elevation={10}>
|
||||
<CardActionArea>
|
||||
{imageTags ? (
|
||||
<CardMedia
|
||||
@@ -37,40 +28,35 @@ export const CardLandscape = ({ itemName, itemId, imageTags, iconType }) => {
|
||||
itemId +
|
||||
"/Images/Primary"
|
||||
}
|
||||
// alt={MediaCollectionTypeIconCollectionCard[iconType]}
|
||||
alt={itemName}
|
||||
className="card-image-container"
|
||||
></CardMedia>
|
||||
) : (
|
||||
<CardMedia className="card-image-container">
|
||||
<CardMedia className="card-image-icon-container">
|
||||
{MediaCollectionTypeIconCollectionCard[iconType]}
|
||||
</CardMedia>
|
||||
)}
|
||||
|
||||
<div className="card-text-container">
|
||||
<Typography variant="button" color="white">
|
||||
<CardContent className="card-text-container">
|
||||
<Typography
|
||||
gutterBottom
|
||||
variant="button"
|
||||
component="div"
|
||||
color="white"
|
||||
>
|
||||
{itemName}
|
||||
</Typography>
|
||||
</div>
|
||||
</CardContent>
|
||||
</CardActionArea>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export const CardPotrait = ({ itemName, itemId, imageTags, iconType }) => {
|
||||
const imageAvailable = () => {
|
||||
console.log(imageTags);
|
||||
if (imageTags == undefined) {
|
||||
console.log("hee");
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
return (
|
||||
<div className="card portrait">
|
||||
<div className="card-image-container">
|
||||
{imageAvailable ? (
|
||||
{imageTags ? (
|
||||
<div
|
||||
className="card-image"
|
||||
style={{
|
||||
@@ -102,13 +88,13 @@ export const CardPotrait = ({ itemName, itemId, imageTags, iconType }) => {
|
||||
CardLandscape.propTypes = {
|
||||
itemName: PropTypes.string.isRequired,
|
||||
itemId: PropTypes.string.isRequired,
|
||||
imageTags: PropTypes.object,
|
||||
imageTags: PropTypes.bool,
|
||||
iconType: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
CardPotrait.propTypes = {
|
||||
itemName: PropTypes.string.isRequired,
|
||||
itemId: PropTypes.string.isRequired,
|
||||
imageTags: PropTypes.object,
|
||||
imageTags: PropTypes.bool,
|
||||
iconType: PropTypes.string.isRequired,
|
||||
};
|
||||
@@ -25,17 +25,11 @@
|
||||
font-size: 4.5em !important;
|
||||
|
||||
&-container {
|
||||
display: flex;
|
||||
display: flex !important;
|
||||
aspect-ratio: 1.777;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
border-radius: $border-radius-default;
|
||||
color: $clr-accent-default;
|
||||
background: $clr-accent-dark;
|
||||
z-index: 0;
|
||||
@@ -48,5 +42,6 @@
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ export const CardScroller = ({ children, displayCards, title }) => {
|
||||
const [carouselRef, setCarouselRef] = useState();
|
||||
|
||||
return (
|
||||
<Box className="card-scroller-container">
|
||||
<Box className="card-scroller-container" sx={{ mb: 4 }}>
|
||||
<Box sx={{ mb: 2 }} className="card-scroller-header-container">
|
||||
<Typography
|
||||
variant="h4"
|
||||
|
||||
Reference in new issue
Block a user