generated from natterstefan/nextjs-template
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
756fdac
commit 36d2764
Showing
9 changed files
with
81 additions
and
10 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,53 @@ | ||
import React from 'react' | ||
import { FaPencilAlt, FaWarehouse } from 'react-icons/fa' | ||
import { FiMonitor } from 'react-icons/fi' | ||
import { HiOutlineSpeakerphone } from 'react-icons/hi' | ||
|
||
import { IItem } from '@/types/types' | ||
|
||
import { SectionTitle } from '../section-title' | ||
|
||
const ITEMS: IItem[] = [ | ||
{ | ||
icon: FaPencilAlt, | ||
title: 'Happy Clients', | ||
text: '578', | ||
}, | ||
{ | ||
icon: FaWarehouse, | ||
title: 'Working Hours', | ||
text: '4780', | ||
}, | ||
{ | ||
icon: FiMonitor, | ||
title: 'Awards Won', | ||
text: '15', | ||
}, | ||
{ | ||
icon: HiOutlineSpeakerphone, | ||
title: 'Coffee Consumed', | ||
text: '3', | ||
}, | ||
] | ||
|
||
export const FunFacts = () => { | ||
return ( | ||
<div className="px-4 mx-auto space-y-4"> | ||
<SectionTitle> | ||
<span>Fun Facts</span> | ||
</SectionTitle> | ||
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4"> | ||
{ITEMS.map(item => ( | ||
<div | ||
key={item.title} | ||
className="flex flex-col items-center w-full p-6 mt-4 space-y-4 border-2 border-gray-300 rounded-lg transform transition-all delay-200 ease-in-out hover:shadow-xl hover:-translate-y-0.5" | ||
> | ||
<item.icon className="text-lg text-green-500 md:text-3xl" /> | ||
<h4 className="text-lg font-bold">{item.title}</h4> | ||
<p className="text-6xl text-gray-300">{item.text}</p> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
) | ||
} |
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 @@ | ||
export * from './FunFacts' |
File renamed without changes.
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,9 @@ | ||
import React, { ReactElement } from 'react' | ||
|
||
export const SectionTitle = ({ children }: { children: ReactElement }) => { | ||
return ( | ||
<h2 className="relative inline-block pb-2 text-2xl font-bold title"> | ||
{children} | ||
</h2> | ||
) | ||
} |
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 @@ | ||
export * from './SectionTitle' |
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
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
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
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,7 @@ | ||
import { IconType } from 'react-icons' | ||
|
||
export interface IItem { | ||
icon: IconType | ||
title: string | ||
text: string | ||
} |
36d2764
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.
Successfully deployed to the following URLs: