generated from 202306-NEA-DZ-FEW/capstone-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
217c067
commit c6d3fe0
Showing
1 changed file
with
28 additions
and
0 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
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; |