Skip to content

Instantly share code, notes, and snippets.

@Daltonic
Created March 19, 2023 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Daltonic/267566f8421f76f2f1947181a617c3c1 to your computer and use it in GitHub Desktop.
Save Daltonic/267566f8421f76f2f1947181a617c3c1 to your computer and use it in GitHub Desktop.
DappBnb Project Card Component
import React from 'react'
import { FaStar, FaEthereum } from 'react-icons/fa'
import { Link } from 'react-router-dom'
import ImageSlider from './ImageSlider'
const Card = ({ appartment }) => {
return (
<div className="shadow-md w-96 text-xl pb-5 rounded-b-2xl mb-20">
<Link to={'/room/' + appartment.id}>
<ImageSlider images={appartment.images} />
</Link>
<div className="px-4">
<div className="flex justify-between items-start mt-2">
<p className="font-semibold capitalize text-[15px]">
{appartment.name}
</p>
<p className="flex justify-start items-center space-x-2 text-sm">
<FaStar />
<span>New</span>
</p>
</div>
<div className="flex justify-between items-center text-sm">
<p className="text-gray-700">{appartment.timestamp}</p>
<b className="flex justify-start items-center space-x-1 font-semibold">
<FaEthereum />
<span>
{appartment.price} night {appartment.deleted}
</span>
</b>
</div>
</div>
</div>
)
}
export default Card
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment