diff --git a/src/components/sections/features/FeaturesGeneral.astro b/src/components/sections/features/FeaturesGeneral.astro index 8551372..be4c6d2 100644 --- a/src/components/sections/features/FeaturesGeneral.astro +++ b/src/components/sections/features/FeaturesGeneral.astro @@ -1,13 +1,24 @@ --- // Import the necessary dependencies import { Image } from "astro:assets"; -import featureImage from "../../../images/features-image.avif"; import IconBlock from "../../ui/blocks/IconBlock.astro"; +import Icon from "../../ui/icons/Icon.astro"; -// Define the string variables `title` and `subTitle` for the main heading and sub-heading text -const title: string = "Meeting Industry Demands"; -const subTitle: string = - "At ScrewFast, we tackle the unique challenges encountered in the hardware and construction sectors. From cutting-edge tools to expert services, we're dedicated to helping you overcome obstacles and achieve your goals."; +interface Feature { + heading: string; + content: string; + svg: string; +} + +interface Props { + title?: string; + subTitle?: string; + features?: Feature[]; + src?: any; + alt?: string; +} +// Define props from Astro +const { title, subTitle, src, alt, features } = Astro.props; ---
- ScrewFast products in floating boxes + { + src && alt && ( + {alt} + ) + }
@@ -36,12 +51,12 @@ const subTitle: string = {title} - {subTitle && -

- {subTitle} -

+ { + subTitle && ( +

+ {subTitle} +

+ ) } @@ -49,69 +64,13 @@ const subTitle: string =
- - - - - - - - - - - - - - - - - - - + { features && + features.map((feature) => ( + + + + )) + }
diff --git a/src/components/sections/features/FeaturesNavs.astro b/src/components/sections/features/FeaturesNavs.astro index 3793548..96c215a 100644 --- a/src/components/sections/features/FeaturesNavs.astro +++ b/src/components/sections/features/FeaturesNavs.astro @@ -2,12 +2,27 @@ // Import the necessary dependencies import TabNav from "../../ui/blocks/TabNav.astro"; import TabContent from "../../ui/blocks/TabContent.astro"; -import construction from "../../../images/construction-image.avif"; -import tools from "../../../images/automated-tools.avif"; -import dashboard from "../../../images/dashboard-image.avif"; +import Icon from "../../ui/icons/Icon.astro"; -// Define the variable for the section's heading -const title: string = `Customize ScrewFast's offerings to perfectly suit your hardware and construction needs.`; +// Define props from Astro +const { title, tabs } = Astro.props; + +// Define TypeScript interface for tab object +interface Tab { + heading: string; + content: string; + svg: string; + src: any; + alt: string; + first?: boolean; + second?: boolean; +} + +// Define TypeScript interface for props +interface Props { + title?: string; + tabs: Tab[]; +} ---