-
Notifications
You must be signed in to change notification settings - Fork 1
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 #84 from GSG-G10/51-property-card
property card
- Loading branch information
Showing
8 changed files
with
142 additions
and
1 deletion.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.row{ | ||
display: flex; | ||
flex-wrap: wrap; | ||
} | ||
.rectangle{ | ||
width: 50%; | ||
background-color:#26B919; | ||
clip-path: polygon(0 -134%, 91% 75%, 91% 100%, 0% 100%); | ||
border-radius: 6px; | ||
display: flex; | ||
justify-content: flex-start; | ||
align-items: center; | ||
padding: 10px; | ||
|
||
|
||
} | ||
.loveicon{ | ||
text-align: end; | ||
} | ||
.price{ | ||
font-size: 1.9rem; | ||
width: 100%; | ||
text-align: center; | ||
margin-top: 5px; | ||
} | ||
.bathroom,.rooms,.beds,.sqft{ | ||
width: 45%; | ||
background-color:#3781CB; | ||
padding: 10px; | ||
margin:0 0 10px 10px; | ||
border-radius: 6px; | ||
display: flex; | ||
justify-content: space-around; | ||
align-items: center; | ||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); | ||
|
||
} |
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,103 @@ | ||
import { | ||
Card, | ||
CardContent, | ||
} from '@mui/material'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import FavoriteBorderIcon from '@mui/icons-material/FavoriteBorder'; | ||
import { makeStyles } from '@mui/styles'; | ||
import Space from '../../assets/space.png'; | ||
import Bath from '../../assets/bath.png'; | ||
import Rooms from '../../assets/rooms.png'; | ||
import Bed from '../../assets/beds.png'; | ||
import './PropertyCard.css'; | ||
|
||
const useStyles = makeStyles({ | ||
card: { | ||
backgroundColor: '#F1F1F1', | ||
maxWidth: 345, | ||
display: 'flex', | ||
flexDirection: 'column', | ||
}, | ||
icons: { | ||
display: 'flex', | ||
flexDirection: 'row', | ||
flexWrap: 'wrap', | ||
|
||
}, | ||
}); | ||
function PropertyCard({ | ||
data: { | ||
type, price, beds, baths, rooms, space, | ||
}, | ||
}) { | ||
const classes = useStyles(); | ||
|
||
return ( | ||
<Card className={classes.card} style={{ backgroundColor: '#F1F1F1' }}> | ||
<CardContent className="row"> | ||
<div className="rectangle"> | ||
{type} | ||
</div> | ||
<div className="loveicon" style={{ width: '50%' }}> | ||
<FavoriteBorderIcon /> | ||
</div> | ||
<div className="price"> | ||
{price} | ||
{' '} | ||
$ | ||
</div> | ||
</CardContent> | ||
|
||
<CardContent className={classes.icons}> | ||
<div className="bathroom"> | ||
<img | ||
src={Bath} | ||
alt="space" | ||
/> | ||
{baths} | ||
{' '} | ||
Bathrooms | ||
</div> | ||
<div className="rooms"> | ||
<img | ||
src={Rooms} | ||
alt="space" | ||
/> | ||
{rooms} | ||
{' '} | ||
Rooms | ||
</div> | ||
<div className="beds"> | ||
<img | ||
src={Bed} | ||
alt="space" | ||
/> | ||
{beds} | ||
{' '} | ||
Beds | ||
</div> | ||
<div className="sqft"> | ||
<img | ||
src={Space} | ||
alt="space" | ||
/> | ||
{space} | ||
Sqft | ||
</div> | ||
</CardContent> | ||
</Card> | ||
); | ||
} | ||
PropertyCard.propTypes = { | ||
data: PropTypes.shape({ | ||
type: PropTypes.string, | ||
price: PropTypes.string, | ||
beds: PropTypes.string, | ||
baths: PropTypes.string, | ||
rooms: PropTypes.string, | ||
space: PropTypes.string, | ||
}).isRequired, | ||
}; | ||
|
||
export default PropertyCard; |
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