diff --git a/cypress/fixtures/images/greenway-international.png b/cypress/fixtures/images/greenway-international.png new file mode 100644 index 000000000..e019e1b11 Binary files /dev/null and b/cypress/fixtures/images/greenway-international.png differ diff --git a/src/components/PlanterQuote.cy.js b/src/components/PlanterQuote.cy.js new file mode 100644 index 000000000..78cde88ef --- /dev/null +++ b/src/components/PlanterQuote.cy.js @@ -0,0 +1,26 @@ +import React from 'react'; + +import { mountWithTheme as mount } from '../models/test-utils'; +import PlanterQuote from './PlanterQuote'; + +beforeEach(() => { + cy.intercept('/_next/**', { + fixture: 'images/greenway-international.png', + }); + cy.viewport(720, 360); +}); + +const info = { + quote: + '“I love how planting trees gives me the opportunity to feed my family and save the world at the same time. I try to plant as many trees as I can.”', + name: 'Samwell A', + photo: '/images/greenway-international.png', + initialDate: 'November 11, 2020', + location: 'Shiramtunda, Tanzania', +}; + +describe('PlanterQuote', () => { + it('PlanterQuote', () => { + mount(); + }); +}); diff --git a/src/components/PlanterQuote.js b/src/components/PlanterQuote.js new file mode 100644 index 000000000..224f917e8 --- /dev/null +++ b/src/components/PlanterQuote.js @@ -0,0 +1,73 @@ +import LocationOnOutlinedIcon from '@mui/icons-material/LocationOnOutlined'; +import { Box, Stack, Typography } from '@mui/material'; +import { makeStyles } from 'models/makeStyles'; +import Image from 'next/image'; +import React from 'react'; + +const useStyles = makeStyles()((theme) => ({ + container: { + background: theme.palette.background.OrangeGreenGradientDark, + display: 'flex', + boxSizing: 'border-box', + height: 'fit-content', + padding: theme.spacing(6), + paddingTop: theme.spacing(10), + paddingBottom: theme.spacing(10), + }, + media: { + height: 110, + width: 110, + borderRadius: '50%', + float: 'left', + }, +})); + +function PlanterQuote({ quote, name, photo, initialDate, location }) { + const { classes } = useStyles(); + return ( + + + + {`${name}'s + + + + + {quote} + + + + + {name} + + + {`Planter since ${initialDate}`} + + + + + {location} + + + + + + + ); +} + +export default PlanterQuote;