-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into reserve-item-component
- Loading branch information
Showing
28 changed files
with
686 additions
and
35 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
Binary file not shown.
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,81 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import styled from '@emotion/styled'; | ||
import { FaFacebook, FaTwitter, FaInstagram } from 'react-icons/fa'; | ||
import { Link } from 'react-router-dom'; | ||
|
||
const DisplayCartCard = ({ imageName, name, shortNote }) => ( | ||
<Container to="/u/dashboard/item-details"> | ||
<Image src={require(`../asset/${imageName}.jpg`).default} alt={name} /> | ||
<Content> | ||
<Name>{name}</Name> | ||
<Note>{shortNote}</Note> | ||
<Icons> | ||
<IconLink href="#" target="_blank"> | ||
<FaFacebook /> | ||
</IconLink> | ||
<IconLink href="#" target="_blank"> | ||
<FaTwitter /> | ||
</IconLink> | ||
<IconLink href="#" target="_blank"> | ||
<FaInstagram /> | ||
</IconLink> | ||
</Icons> | ||
</Content> | ||
</Container> | ||
); | ||
|
||
DisplayCartCard.propTypes = { | ||
imageName: PropTypes.string.isRequired, | ||
name: PropTypes.string.isRequired, | ||
shortNote: PropTypes.string.isRequired, | ||
}; | ||
|
||
const Container = styled(Link)` | ||
display: flex; | ||
flex-direction: column; | ||
text-decoration: none; | ||
width: 300px; | ||
// border: 1px solid #ccc; | ||
border-radius: 8px; | ||
overflow: hidden; | ||
// box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | ||
`; | ||
|
||
const Image = styled.img` | ||
width: 100%; | ||
height: 200px; | ||
border: 1px solid blue; | ||
border-radius: 50%; | ||
margin-top: 1rem; | ||
object-fit: cover; | ||
`; | ||
|
||
const Content = styled.div` | ||
padding: 16px; | ||
align-items: center; | ||
text-align: center; | ||
`; | ||
|
||
const Name = styled.h2` | ||
font-size: 1.5rem; | ||
margin-bottom: 8px; | ||
`; | ||
|
||
const Note = styled.p` | ||
font-size: 1rem; | ||
margin-bottom: 16px; | ||
`; | ||
|
||
const Icons = styled.div` | ||
display: flex; | ||
gap: 15px; | ||
margin-left: 5rem; | ||
`; | ||
|
||
const IconLink = styled.a` | ||
color: #333; | ||
font-size: 1.5rem; | ||
`; | ||
|
||
export default DisplayCartCard; |
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,167 @@ | ||
import React, { useState } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import styled from '@emotion/styled'; | ||
import { FaCog, FaArrowRight, FaSyncAlt } from 'react-icons/fa'; | ||
|
||
const DisplayItemCard = ({ name, imgSrc, amount, description }) => { | ||
const [rotation, setRotation] = useState(0); | ||
|
||
const handleRotate = () => { | ||
setRotation((prevRotation) => (prevRotation + 90) % 360); | ||
}; | ||
return ( | ||
<Container> | ||
<Image> | ||
<Image1 src={imgSrc} alt={name} rotation={rotation} /> | ||
<RotateButton onClick={handleRotate}> | ||
<FaSyncAlt /> | ||
</RotateButton> | ||
</Image> | ||
<Content> | ||
<Name>{name}</Name> | ||
<Description> | ||
{description} | ||
</Description> | ||
<Table> | ||
<TableRow color="#ccc"> | ||
<TableData>Finance Fee</TableData> | ||
<TableData>{amount}</TableData> | ||
</TableRow> | ||
<TableRow color="#fff"> | ||
<TableData>Opton to purchase fee</TableData> | ||
<TableData>{amount}</TableData> | ||
</TableRow> | ||
<TableRow color="#ccc"> | ||
<TableData>Total amount payable</TableData> | ||
<TableData>{amount}</TableData> | ||
</TableRow> | ||
<TableRow color="#fff"> | ||
<TableData>Duration</TableData> | ||
<TableData>{amount}</TableData> | ||
</TableRow> | ||
</Table> | ||
<BoldText> | ||
5.9% APR Representative | ||
</BoldText> | ||
<ColorWheel> | ||
DISCOVER MORE MODEL | ||
</ColorWheel> | ||
<ConfigureButton> | ||
<SettingIcon> | ||
<FaCog /> | ||
</SettingIcon> | ||
Reserve | ||
<ArrowIcon> | ||
<FaArrowRight /> | ||
</ArrowIcon> | ||
</ConfigureButton> | ||
</Content> | ||
</Container> | ||
)}; | ||
|
||
DisplayItemCard.propTypes = { | ||
name: PropTypes.string.isRequired, | ||
amount: PropTypes.string.isRequired, | ||
description: PropTypes.string.isRequired, | ||
imgSrc: PropTypes.string.isRequired, | ||
}; | ||
|
||
const Container = styled.div` | ||
// border: 1px solid #ccc; | ||
display: flex; | ||
border-radius: 8px; | ||
text-align: right; | ||
// margin-right: -20rem; | ||
// width: 40%; | ||
overflow: hidden; | ||
// box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | ||
`; | ||
|
||
const Image = styled.div` | ||
border: 1px solid blue; | ||
width: 40rem; | ||
margin-right: 2rem; | ||
postion: relative; | ||
`; | ||
|
||
const Image1 = styled.img` | ||
border: 1px solid blue; | ||
width: 40rem; | ||
margin-right: 2rem; | ||
transform: rotate(${(props) => props.rotation}deg); | ||
transition: transform 0.5s ease; | ||
`; | ||
|
||
const RotateButton = styled.button` | ||
position: absolute; | ||
bottom: 1rem; | ||
right: 55rem; | ||
background-color: #fff; | ||
border: none; | ||
border-radius: 50%; | ||
padding: 0.5rem; | ||
cursor: pointer; | ||
`; | ||
|
||
const Content = styled.div` | ||
padding: 4rem 2rem; | ||
`; | ||
|
||
const Name = styled.h2` | ||
font-size: 1.5rem; | ||
margin-bottom: 1rem; | ||
`; | ||
|
||
const Description = styled.p` | ||
font-size: 1rem; | ||
margin-bottom: 1rem; | ||
`; | ||
|
||
const Table = styled.table` | ||
width: 100%; | ||
margin-bottom: 2rem; | ||
margin-top: 3rem; | ||
`; | ||
|
||
const TableRow = styled.tr` | ||
background-color: ${(props) => props.color}; | ||
`; | ||
|
||
const TableData = styled.td` | ||
padding: 1rem; | ||
text-align: center; | ||
`; | ||
|
||
const BoldText = styled.div` | ||
font-weight: bolder; | ||
margin-bottom: 2rem; | ||
margin-right: 10rem; | ||
`; | ||
|
||
const ColorWheel = styled.div` | ||
/* Add styles for the color wheel */ | ||
margin-bottom: 5rem; | ||
`; | ||
|
||
const ConfigureButton = styled.button` | ||
background-color: green; | ||
color: #fff; | ||
padding: 8px 16px; | ||
display: flex; | ||
align-items: center; | ||
margin-left: 15rem; | ||
border: none; | ||
border-radius: 5rem; | ||
cursor: pointer; | ||
`; | ||
|
||
const SettingIcon = styled.span` | ||
margin-right: 8px; | ||
`; | ||
|
||
const ArrowIcon = styled.span` | ||
margin-left: 8px; | ||
margin-top: 2px; | ||
`; | ||
|
||
export default DisplayItemCard; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
import React from 'react'; | ||
import { Outlet } from 'react-router-dom'; | ||
|
||
import Footer from './footer/Footer'; | ||
import Header from './header/Header'; | ||
// import Footer from './footer/Footer'; | ||
import Header from './header/Header'; | ||
|
||
const LandingPageLayout = () => ( | ||
<> | ||
<Header /> | ||
<main> | ||
<Outlet /> | ||
</main> | ||
<Footer /> | ||
</> | ||
); | ||
const LandingPageLayout = () => { | ||
// eslint-disable-next-line arrow-body-style | ||
return ( | ||
<> | ||
<Header /> | ||
<main> | ||
<Outlet /> | ||
</main> | ||
{/* <Footer /> */} | ||
</> | ||
); | ||
}; | ||
|
||
export default LandingPageLayout; |
Oops, something went wrong.