diff --git a/src/components/TestimonialsSection.astro b/src/components/TestimonialsSection.astro index d8e784b..551321c 100644 --- a/src/components/TestimonialsSection.astro +++ b/src/components/TestimonialsSection.astro @@ -1,13 +1,10 @@ --- -// Variables for customization of the LoginModal Component -// Main heading +// Define constants for content const title: string = "Fast-Track Your Projects"; - -// Sub-heading text const subTitle: string = "At ScrewFast, we ensure a swift start with instant account setup. Experience the speed of construction redefined."; -/* TypeScript type for testimonials. */ +// TypeScript type for testimonials type Testimonial = { content: string; author: string; @@ -15,7 +12,7 @@ type Testimonial = { avatarSrc: string; }; -/* An array of testimonials, each being an object that conforms to the above `Testimonial` type. */ +// An array of testimonials const testimonials: Testimonial[] = [ { content: @@ -27,13 +24,13 @@ const testimonials: Testimonial[] = [ }, ]; -/* TypeScript type for stats. */ +// TypeScript type for stats. type StatProps = { count: string; description: string; }; -/* An array of stats, each being an object that conforms to the above `StatProps` type. */ +// An array of stats const statistics: StatProps[] = [ { count: "70k+", @@ -55,12 +52,15 @@ const statistics: StatProps[] = [ ]; --- -
{testimonial.content}
@@ -71,7 +77,7 @@ const testimonials: Testimonial[] = [{title}
{subTitle}
diff --git a/src/components/ui/blocks/TabContent.astro b/src/components/ui/blocks/TabContent.astro index 5a60382..2d7c17d 100644 --- a/src/components/ui/blocks/TabContent.astro +++ b/src/components/ui/blocks/TabContent.astro @@ -1,8 +1,11 @@ --- +// Import the Image component from astro:assets import { Image } from "astro:assets"; +// Destructure the component properties from Astro.props const { id, aria, src, alt, first, second } = Astro.props; +// Define TypeScript interface for the properties interface Props { id: string; aria: string; @@ -11,29 +14,35 @@ interface Props { first?: boolean; second?: boolean; } - +// Set class based on 'first' property +// If 'first' is present, show the tab content immediately const firstClass = first ? "" : "hidden"; -const secondClass = second ? "shadow-xl aspect-[5/4] bg-neutral-300 dark:bg-neutral-600 object-cover p-3 lg:aspect-auto shadow-neutral-200 rounded-xl dark:shadow-neutral-900/[.2]" : - "shadow-xl aspect-[3/2] object-cover lg:aspect-auto shadow-neutral-200 rounded-xl dark:shadow-neutral-900/[.2]"; +// Set class based on 'second' property +// If 'second' is present, use an alternate style for the image +const secondClass = second + ? "shadow-xl aspect-[5/4] bg-neutral-300 dark:bg-neutral-600 object-cover p-3 lg:aspect-auto shadow-neutral-200 rounded-xl dark:shadow-neutral-900/[.2]" + : "shadow-xl aspect-[3/2] object-cover lg:aspect-auto shadow-neutral-200 rounded-xl dark:shadow-neutral-900/[.2]"; /* -first: This prop should be set to true for the initial TabContent component in your list to ensure that it's visible when the page first loads. All subsequent TabContent components should omit this prop or set it to false. +first: This property should be set to true for the initial TabContent component +in your list to ensure that it's visible when the page first loads. +All subsequent TabContent components should omit this property or set it to false. -second: This prop allows to control changes in the look of the Image. If it is set to true, the Image will have different aspect ratio and background color. If this prop is not provided or is set to false, the Image will use default styling. You can enable this for any TabContent component you want to apply these changes to. +second: This property allows to control changes in the look of the Image. +If it is set to true, the Image will have different aspect ratio and background color. +If this property is not provided or is set to false, the Image will use default styling. +You can enable this for any TabContent component you want to apply these changes to. -Example: +This is the full example: