Add padding too charity images

This commit is contained in:
Sinclair Chen 2022-05-03 11:06:32 -04:00
parent 3434b3de3f
commit 20a92ec4f2

View File

@ -19,14 +19,15 @@ export function CharityCard(props: { charity: Charity }) {
<Row className="mt-6"> <Row className="mt-6">
{tags?.includes('Featured') && <FeaturedBadge />} {tags?.includes('Featured') && <FeaturedBadge />}
</Row> </Row>
<div className="px-8">
<figure className="relative h-32 p-4"> <figure className="relative h-32">
{photo ? ( {photo ? (
<Image src={photo} alt="" layout="fill" objectFit="contain" /> <Image src={photo} alt="" layout="fill" objectFit="contain" />
) : ( ) : (
<div className="h-full w-full bg-gradient-to-r from-slate-300 to-indigo-200" /> <div className="h-full w-full bg-gradient-to-r from-slate-300 to-indigo-200" />
)} )}
</figure> </figure>
</div>
<div className="card-body"> <div className="card-body">
{/* <h3 className="card-title line-clamp-3">{name}</h3> */} {/* <h3 className="card-title line-clamp-3">{name}</h3> */}
<div className="line-clamp-4 text-sm">{preview}</div> <div className="line-clamp-4 text-sm">{preview}</div>