-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8 marketing card #60
8 marketing card #60
Changes from 2 commits
8eba7a0
ae881da
4a3f37a
e7f1c17
bfebd2d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from "react"; | ||
|
||
const Card = ({ icon, title, children }) => { | ||
return ( | ||
<div className='p-4 mb-4 w-1/3 flex justify-center items-center'> | ||
<div className='text-center '> | ||
{icon} | ||
<h3 className='p-2 font-bold'>{title}</h3> | ||
{children} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Card; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from "react"; | ||
import Card from "./Card"; | ||
|
||
const SectionWithCards = () => { | ||
return ( | ||
<section className='bg-gray-100 p-8 border w-5/6 mx-auto text-center my-6 '> | ||
<h2 className='text-2xl font-bold mb-8 '>Section Title</h2> | ||
|
||
<div className='flex flex-wrap items-center mx-4 border-red'> | ||
<div className='w-full md:w-1/3 px-4 mb-4 flex flex-col items-center justify-center border border-blue-600'> | ||
<Card> | ||
<img | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to add to what @ismail-benlaredj said it's recommended you use Image when importing images and import it from "Next" for built-in optimization instead of using img . |
||
className='pb-4' | ||
src='./marketing-icons/sec1.png' | ||
alt='Icon' | ||
/> | ||
<h3 className='text-xl font-bold mb-2'>Card 1 Title</h3> | ||
<p>Card 1 Content</p> | ||
</Card> | ||
</div> | ||
|
||
<div className='w-full md:w-1/3 px-4 mb-4 bg-white flex flex-col items-center justify-center border border-blue-600'> | ||
<Card> | ||
<img | ||
className='pb-4' | ||
src='./marketing-icons/sec1.png' | ||
alt='Icon' | ||
/> | ||
<h3 className='text-xl font-bold mb-2'>Card 1 Title</h3> | ||
<p>Card 1 Content</p> | ||
</Card> | ||
</div> | ||
<div className='w-full md:w-1/3 px-4 mb-4 bg-white flex flex-col items-center justify-center border border-blue-600'> | ||
<Card> | ||
<img | ||
className='pb-4' | ||
src='./marketing-icons/sec1.png' | ||
alt='Icon' | ||
/> | ||
<h3 className='text-xl font-bold mb-2'>Card 1 Title</h3> | ||
<p>Card 1 Content</p> | ||
</Card> | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
}; | ||
|
||
export default SectionWithCards; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good Job. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, Mohamed! 👏 I really like the sectionWithCard.
The design includes sections with different numbers of cards, some with 3 cards and others with 4 If you modify the sectionWithCard component to accept elements as children, it will provide more flexibility.
Also, consider removing the borders .
There seems to be a minor issue in the description – please check the screenshot provided for clarification.