Skip to content

Commit

Permalink
feat: add blog card
Browse files Browse the repository at this point in the history
  • Loading branch information
LaidBengli committed Oct 15, 2023
1 parent 217c067 commit c6d3fe0
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/components/blogcard/BlogCard.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from "react";

const BlogCard = ({ blog }) => {
return (
<div className='bg-white shadow-md rounded-xl ml-2 mr-2 mb-2 mt-2 px-2 py-2 verflow-hidden'>
<div className='relative '>
<div className='bg-green-500 text-white absolute bottom-0 left-0 py-0 px-0 rounded-tr-lg'>
<p className='text-sm bg-green ml-0 px-3 py-2'>
{blog.date}
</p>
</div>
<img
src={blog.image}
alt={blog.title}
className='w-full h-48 object-cover rounded-xl'
/>
</div>
<div className='p-6'>
<h3 className='text-2xl text-center font-semibold text-gray-800 mb-2 '>
{blog.title}
</h3>
<p className='text-gray-700 text-center'>{blog.description}</p>
</div>
</div>
);
};

export default BlogCard;

0 comments on commit c6d3fe0

Please sign in to comment.