diff --git a/src/components/SectionHowItWork.tsx b/src/components/SectionHowItWork.tsx new file mode 100644 index 0000000..1699372 --- /dev/null +++ b/src/components/SectionHowItWork.tsx @@ -0,0 +1,97 @@ +import React, { FC } from "react"; +import HIW1img from "@/images/HIW1.png"; +import HIW2img from "@/images/HIW2.png"; +import HIW3img from "@/images/HIW3.png"; +import VectorImg from "@/images/VectorHIW.svg"; +import Image, { StaticImageData } from "next/image"; +import Heading from "@/shared/Heading"; + +export interface SectionHowItWorkProps { + className?: string; + data?: { + id: number; + title: string; + desc: string; + img: StaticImageData; + imgDark?: StaticImageData; + }[]; +} + +const DEMO_DATA: SectionHowItWorkProps["data"] = [ + { + id: 1, + img: HIW1img, + title: "Book & relax", + desc: "Let each trip be an inspirational journey, each room a peaceful space", + }, + { + id: 2, + img: HIW2img, + title: "Smart checklist", + desc: "Let each trip be an inspirational journey, each room a peaceful space", + }, + { + id: 3, + img: HIW3img, + title: "Save more", + desc: "Let each trip be an inspirational journey, each room a peaceful space", + }, +]; + +const SectionHowItWork: FC = ({ + className = "", + data = DEMO_DATA, +}) => { + return ( +
+ + How it work + +
+ + {data.map((item) => ( +
+ {item.imgDark ? ( + <> + + + + ) : ( + + )} +
+

{item.title}

+ + {item.desc} + +
+
+ ))} +
+
+ ); +}; + +export default SectionHowItWork;