diff --git a/src/components/sections/testimonials/TestimonialItem.astro b/src/components/sections/testimonials/TestimonialItem.astro new file mode 100644 index 0000000..3b29783 --- /dev/null +++ b/src/components/sections/testimonials/TestimonialItem.astro @@ -0,0 +1,52 @@ +--- +import { Image } from "astro:assets"; + +const { content, author, role, avatarSrc } = Astro.props; + +interface Props { + content: string; + author: string; + role: string; + avatarSrc: string; +} +--- + +
+ + +diff --git a/src/components/sections/testimonials/TestimonialsSection.astro b/src/components/sections/testimonials/TestimonialsSection.astro index 5b36c34..9fe5e59 100644 --- a/src/components/sections/testimonials/TestimonialsSection.astro +++ b/src/components/sections/testimonials/TestimonialsSection.astro @@ -1,9 +1,20 @@ --- -import { Image } from "astro:assets"; -// Define constants for content -const title: string = "Fast-Track Your Projects"; -const subTitle: string = - "At ScrewFast, we ensure a swift start with instant account setup. Experience the speed of construction redefined."; +import TestimonialItem from "./TestimonialItem.astro"; +import StatsGrid from "../../ui/blocks/StatsGrid.astro"; + +const { + title, + subTitle, + testimonials, + statistics +} = Astro.props; + +interface Props { + title: string; + subTitle?: string; + testimonials?: Testimonial[]; + statistics?: StatProps[]; +} // TypeScript type for testimonials type Testimonial = { @@ -13,44 +24,11 @@ type Testimonial = { avatarSrc: string; }; -// An array of testimonials -const testimonials: Testimonial[] = [ - { - content: - "ScrewFast dramatically boosted our project efficiency. Setup was instant, and their rapid response times are phenomenal. Truly a game-changer in hardware and construction support!", - author: "Samantha Ruiz", - role: "Chief Operating Officer | ConstructIt Inc.", - avatarSrc: - "https://images.unsplash.com/photo-1593104547489-5cfb3839a3b5?q=80&w=1453&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D8&auto=format&fit=facearea&facepad=2&w=320&h=320&q=80", - }, -]; - // TypeScript type for stats. type StatProps = { count: string; description: string; }; - -// An array of stats -const statistics: StatProps[] = [ - { - count: "70k+", - description: "customers equipped — from DIY to major construction firms", - }, - { - count: "35%", - description: - "uptick in project efficiency with ScrewFast tools and services", - }, - { - count: "15.3%", - description: "reduction in maintenance costs reported by long-term clients", - }, - { - count: "2x", - description: "quicker assembly using innovative fastening solutions", - }, -]; ---++ ++ {content} +
++++++++ +++ {author} ++{role}+
{subTitle}
+ } - { + { testimonials && testimonials.map((testimonial) => ( -- - -+-- - -- {testimonial.content} -
-
- {stat.description} -
-+ {description} +
+