|
| 1 | +import React from "react"; |
| 2 | +import { LuNetwork } from "react-icons/lu"; |
| 3 | +import { FaFile, FaCopy, FaPencilRuler } from "react-icons/fa"; |
| 4 | +import { IoMdCloseCircle } from "react-icons/io"; |
| 5 | + |
| 6 | +// Map icon names to actual components |
| 7 | +const iconMap = { |
| 8 | + FaFile: FaFile, |
| 9 | + FaCopy: FaCopy, |
| 10 | + FaPencilRuler: FaPencilRuler, |
| 11 | +}; |
| 12 | + |
| 13 | +const features = [ |
| 14 | + { |
| 15 | + title: "Browse Components", |
| 16 | + description: |
| 17 | + "Explore a curated collection of clean, ready-to-use React + Tailwind components for modern projects.", |
| 18 | + icon: "FaFile", |
| 19 | + }, |
| 20 | + { |
| 21 | + title: "Copy the Code", |
| 22 | + description: |
| 23 | + "Click copy and paste directly into your project. No installation required.", |
| 24 | + icon: "FaCopy", |
| 25 | + }, |
| 26 | + { |
| 27 | + title: "Paste & Customize", |
| 28 | + description: |
| 29 | + "Tweak text, colors, and structure easily to match your brand and needs.", |
| 30 | + icon: "FaPencilRuler", |
| 31 | + }, |
| 32 | +]; |
| 33 | + |
| 34 | +export default function Hero() { |
| 35 | + return ( |
| 36 | + <section className="py-12 px-6"> |
| 37 | + <div className="max-w-6xl mx-auto text-center mb-12"> |
| 38 | + <span className="text-xs uppercase border border-black rounded-full bg-white px-6 py-2 tracking-widest text-black mb-4 inline-block"> |
| 39 | + <div className="flex gap-2 items-center"> |
| 40 | + <LuNetwork className="text-lg" /> |
| 41 | + How it works |
| 42 | + </div> |
| 43 | + </span> |
| 44 | + <h2 className="text-4xl md:text-4xl font-medium text-neutral-900"> |
| 45 | + Start Building with <span className="font-medium">Stream</span> |
| 46 | + <span className="px-2 py-2 bg-black text-white rounded-lg">UI</span>{" "} |
| 47 | + seconds |
| 48 | + </h2> |
| 49 | + <p className="mt-4 text-neutral-600 dark:text-neutral-400 max-w-xl mx-auto"> |
| 50 | + Build faster with clean, reusable components designed for modern |
| 51 | + products. |
| 52 | + </p> |
| 53 | + </div> |
| 54 | + <div className="grid grid-cols-1 md:grid-cols-3 gap-6 max-w-6xl mx-auto"> |
| 55 | + {features.map((item, idx) => ( |
| 56 | + <div |
| 57 | + key={idx} |
| 58 | + className="rounded-xl bg-white shadow-lg" |
| 59 | + > |
| 60 | + <div className="flex justify-between mx-2 my-2"> |
| 61 | + <IoMdCloseCircle className="text-lg text-black opacity-50"/> |
| 62 | + <IoMdCloseCircle className="text-lg text-black opacity-50"/> |
| 63 | + </div> |
| 64 | + <div className="flex flex-col items-center text-center p-6"> |
| 65 | + {iconMap[item.icon] && |
| 66 | + React.createElement(iconMap[item.icon], { |
| 67 | + className: "text-4xl mb-4", |
| 68 | + })} |
| 69 | + <h3 className="text-lg font-medium text-neutral-800"> |
| 70 | + {item.title} |
| 71 | + </h3> |
| 72 | + <p className="mt-2 text-sm text-neutral-600"> |
| 73 | + {item.description} |
| 74 | + </p> |
| 75 | + </div> |
| 76 | + <div className="flex justify-between mx-2 my-2"> |
| 77 | + <IoMdCloseCircle className="text-lg text-black opacity-50"/> |
| 78 | + <IoMdCloseCircle className="text-lg text-black opacity-50"/> |
| 79 | + </div> |
| 80 | + </div> |
| 81 | + ))} |
| 82 | + </div> |
| 83 | + </section> |
| 84 | + ); |
| 85 | +} |
0 commit comments