import Image from "next/image"; import Link from "next/link"; import React from "react"; interface DesignToolProps { // Section title titleColoredText: string; titleBoldText: string; description: string; // Main card content imageUrl: string; imageAlt: string; backgroundColor: string; imagePosition: string; // New prop to control image position // Right side content headingText: string; coloredHeading: string; paragraphText: string; highlightedBrandName: string; highlightedFeature: string; // Feature list features: string[]; // CTA button ctaText: string; ctaBackgroundColor: string; ctaTextColor: string; // Optional className for additional styling className?: string; } const FeatureSection: React.FC = ({ titleColoredText, titleBoldText, description, imageUrl, imageAlt, backgroundColor, imagePosition = "left", headingText, coloredHeading, paragraphText, highlightedBrandName, highlightedFeature, features, ctaText, ctaBackgroundColor, ctaTextColor, className, }) => { // Determine border radius based on image position const imageContainerClasses = imagePosition === "left" ? "rounded-tl-[40px] rounded-bl-[40px]" : "rounded-tr-[40px] rounded-br-[40px]"; // Create the image container and content container const imageContainer = (
{imageAlt}
); const contentContainer = (
{headingText} {coloredHeading}
{paragraphText.split(highlightedBrandName)[0]} {highlightedBrandName} { paragraphText .split(highlightedBrandName)[1] .split(highlightedFeature)[0] } {highlightedFeature} {paragraphText.split(highlightedFeature)[1]}
{features.map((feature, index) => (
checkmark
{feature}
))}

{ctaText}

); return (
{titleColoredText} {" " + titleBoldText}
{description}
{imagePosition === "left" ? ( <> {imageContainer} {contentContainer} ) : ( <> {contentContainer} {imageContainer} )}
); }; export default FeatureSection;