import React from "react"; import { motion } from "framer-motion"; import { FileText, Palette, Code, Rocket } from "lucide-react"; import { GridPattern } from "./GridPattern"; // Define the step interface interface Step { title: string; description: string; icon: React.ComponentType | React.ReactElement; color?: string; // Make color optional number?: string; details?: string[]; } interface StepsIllustratedProps { title?: string; subtitle?: string; steps?: Step[]; } const defaultSteps: Step[] = [ { title: "Define Scope", description: "We analyze your requirements and create a detailed project roadmap with clear timelines.", icon: FileText, color: "from-blue-500 to-cyan-500" }, { title: "Design UI/UX", description: "Our designers create intuitive, user-centered interfaces that align with your brand.", icon: Palette, color: "from-purple-500 to-pink-500" }, { title: "Develop with Agile Sprints", description: "We build your product using agile methodology with regular updates and feedback loops.", icon: Code, color: "from-green-500 to-emerald-500" }, { title: "Test, Launch & Scale", description: "Comprehensive testing, smooth deployment, and ongoing support for continuous growth.", icon: Rocket, color: "from-[#E5195E] to-orange-500" } ]; interface Step { title: string; description: string; icon: React.ComponentType | React.ReactElement; color?: string; // Make color optional number?: string; details?: string[]; } const StepCard = ({ step, index, totalSteps }: { step: Step; index: number; totalSteps: number }) => { // Define default colors if not provided const defaultColors = [ "from-blue-500 to-cyan-500", "from-purple-500 to-pink-500", "from-green-500 to-emerald-500", "from-[#E5195E] to-orange-500" ]; const color = step.color || defaultColors[index] || "from-blue-500 to-cyan-500"; return ( {/* Connection Line */} {index < totalSteps - 1 && (
)}
{/* Handle both React components and JSX elements */} {typeof step.icon === 'function' ? ( ) : ( React.cloneElement(step.icon as React.ReactElement, { className: "w-10 h-10 text-white" }) )}
{index + 1}

{step.title}

{step.description}

); }; export const StepsIllustrated = ({ title, subtitle, steps }: StepsIllustratedProps) => { const finalSteps = steps ?? defaultSteps; const finalTitle = title ?? "How We Turn Your Idea Into a Scalable Product"; const finalSubtitle = subtitle ?? "Our proven 4-step process ensures your project is delivered on time, on budget, and exceeds expectations."; return (

{finalTitle}

{finalSubtitle}

{finalSteps.map((step, index) => ( ))}
); };