Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinkipruto committed Oct 23, 2024
1 parent c6ac870 commit 022db5b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
33 changes: 18 additions & 15 deletions apps/climatemappedafrica/src/components/HowItWorks/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Link } from "@commons-ui/next";
import { RichText } from "@commons-ui/payload";
import { Box, Button, Grid, Typography } from "@mui/material";
import { Box, Grid, Typography } from "@mui/material";
import PropTypes from "prop-types";
import React from "react";

Expand All @@ -13,7 +14,7 @@ function HowItWorks({
link,
video,
backgroundImage,
foregroundImage,
image: foregroundImage,
...props
}) {
const classes = useStyles(props);
Expand Down Expand Up @@ -95,16 +96,14 @@ function HowItWorks({
},
"& .vjs-poster": {
backgroundColor: "#ffffffE6",
backgroundSize: "120%",
backgroundSize: {
xs: "120%",
md: "auto",
},
},
"& .video-js .vjs-big-play-button": {
display: "none",
},
[theme.breakpoints.up("md")]: {
"& .vjs-poster": {
backgroundSize: "auto",
},
},
height: {
xs: theme.typography.pxToRem(227),
md: theme.typography.pxToRem(194),
Expand Down Expand Up @@ -138,24 +137,27 @@ function HowItWorks({
},
})}
/>
<Button href={link.href} variant="text">
{link.label}
</Button>
<Link
href={link.href}
sx={{
textDecoration: "none",
}}
>
<Typography variant="button">{link.label}</Typography>
</Link>
</Grid>
<Grid item lg={1} />
<Grid
item
xs={12}
md={5}
sx={(theme) => ({
display: "flex",
sx={{
alignItems: "center",
justifyContent: {
xs: "center",
md: "flex-end",
},
marginBottom: theme.typography.pxToRem(23),
})}
}}
>
<Box
sx={(theme) => ({
Expand All @@ -173,6 +175,7 @@ function HowItWorks({
backgroundImage: `url(${foregroundImage.src})`,
backgroundSize: "contain",
backgroundRepeat: "no-repeat",
marginBottom: theme.typography.pxToRem(23),
})}
/>
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion apps/climatemappedafrica/src/payload/blocks/HowItWorks.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const HowItWorks = {
}),
image({
overrides: {
name: "foregroundImage",
name: "image",
required: true,
admin: {
description: "Image to display on the right side of the video.",
Expand Down

0 comments on commit 022db5b

Please sign in to comment.