-
Notifications
You must be signed in to change notification settings - Fork 6
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
Showing
5 changed files
with
93 additions
and
7 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
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,17 @@ | ||
import { cn } from "@/lib/utils"; | ||
import React from "react"; | ||
|
||
type Props = { | ||
className?: string; | ||
title: string; | ||
}; | ||
|
||
const Heading = ({ className, title }: Props) => { | ||
return ( | ||
<div className={cn(className, "max-w-[50rem] mx-auto mb-12 lg:mb-20")}> | ||
{title && <h2 className="h2">{title}</h2>} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Heading; |
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,67 @@ | ||
import React from "react"; | ||
import Section from "@/components/layout/section"; | ||
import Heading from "./heading"; | ||
import { benefits } from "@/constants"; | ||
import Image from "next/image"; | ||
import Arrow from "@/components/svg/arrow"; | ||
import { GradientLight } from "@/components/design/benefits"; | ||
import ClipPath from "@/components/svg/clip-path"; | ||
|
||
type Props = {}; | ||
|
||
const Benefits = (props: Props) => { | ||
return ( | ||
<Section id="features"> | ||
<div className="container relative z-2"> | ||
<Heading | ||
className="text-center md:max-w-md lg:max-w-2xl" | ||
title="Chat Smarter, Not Harder with Brainwave" | ||
/> | ||
|
||
<div className="mb-10 flex flex-wrap gap-10"> | ||
{benefits.map((item) => ( | ||
<div | ||
key={item.id} | ||
className="relative block bg-[length:100%_100%] bg-no-repeat p-0.5 md:max-w-[24rem]" | ||
style={{ | ||
backgroundImage: `url(${item.backgroundUrl})`, | ||
}} | ||
> | ||
<div className="pointer-events-none relative z-2 flex min-h-[22rem] flex-col p-[2.4rem]"> | ||
<h5 className="h5 mb-5">{item.title}</h5> | ||
<p className="body-2 mb-6 text-n-3">{item.text}</p> | ||
<div className="mt-auto flex items-center"> | ||
<Image src={item.iconUrl} width={48} height={48} alt={item.title} /> | ||
<p className="ml-auto font-code text-xs font-bold uppercase tracking-wider text-n-1"> | ||
Explore more | ||
</p> | ||
<Arrow /> | ||
</div> | ||
</div> | ||
|
||
{item.light && <GradientLight />} | ||
|
||
<div className="absolute inset-0.5 bg-n-8" style={{ clipPath: `url(#benefits)` }}> | ||
<div className="absolute inset-0 opacity-0 transition-opacity hover:opacity-10"> | ||
{item.imageUrl && ( | ||
<Image | ||
src={item.imageUrl} | ||
width={380} | ||
height={362} | ||
alt={item.title} | ||
className="size-full object-cover" | ||
/> | ||
)} | ||
</div> | ||
</div> | ||
|
||
<ClipPath /> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
</Section> | ||
); | ||
}; | ||
|
||
export default Benefits; |