Add type definitions to HeroSection variables
The commit provides type definitions for the variables in the HeroSection component. By doing so, this enhances readability and maintainability of the codebase and helps the developers understand what kind of data each variable is intended to hold.
This commit is contained in:
parent
5b71fa87df
commit
ee4cad5474
1 changed files with 9 additions and 9 deletions
|
@ -9,29 +9,29 @@ import FullStar from "./ui/stars/FullStar.astro";
|
||||||
import HalfStar from "./ui/stars/HalfStar.astro";
|
import HalfStar from "./ui/stars/HalfStar.astro";
|
||||||
|
|
||||||
/* `title` variable used to customise the main heading. */
|
/* `title` variable used to customise the main heading. */
|
||||||
const title = `Equip Your Projects with <span
|
const title:string = `Equip Your Projects with <span
|
||||||
class="text-yellow-500 dark:text-yellow-400">ScrewFast</span>`;
|
class="text-yellow-500 dark:text-yellow-400">ScrewFast</span>`;
|
||||||
|
|
||||||
/* `subTitle` variable used to customise the sub-heading text. */
|
/* `subTitle` variable used to customise the sub-heading text. */
|
||||||
const subTitle =
|
const subTitle:string =
|
||||||
"Top-quality hardware tools and expert construction services for every project need.";
|
"Top-quality hardware tools and expert construction services for every project need.";
|
||||||
|
|
||||||
/* `primaryBtn` and `primaryBtnURL` variables used to customise the text and target link of the primary button. */
|
/* `primaryBtn` and `primaryBtnURL` variables used to customise the text and target link of the primary button. */
|
||||||
const primaryBtn = "Start Exploring";
|
const primaryBtn:string = "Start Exploring";
|
||||||
const primaryBtnURL = "#";
|
const primaryBtnURL:string = "#";
|
||||||
|
|
||||||
/* `secondaryBtn` and `secondaryBtnURL` variables used to customise the text and target link of the secondary button. */
|
/* `secondaryBtn` and `secondaryBtnURL` variables used to customise the text and target link of the secondary button. */
|
||||||
const secondaryBtn = "Contact Sales Team";
|
const secondaryBtn:string = "Contact Sales Team";
|
||||||
const secondaryBtnURL = "#";
|
const secondaryBtnURL:string = "#";
|
||||||
|
|
||||||
/* `rating` variable used to customise the rating. */
|
/* `rating` variable used to customise the rating. */
|
||||||
const rating = 4.8;
|
const rating:number = 4.8;
|
||||||
|
|
||||||
/* `starCount` variable used to customise the star rating with the full stars. */
|
/* `starCount` variable used to customise the star rating with the full stars. */
|
||||||
const starCount = 4;
|
const starCount:number = 4;
|
||||||
|
|
||||||
/* `reviews` variable used to customise the number of reviews. */
|
/* `reviews` variable used to customise the number of reviews. */
|
||||||
const reviews = "12.8k";
|
const reviews:string = "12.8k";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
In the above, the title, subTitle, primaryBtn, primaryBtnURL, secondaryBtn, secondaryBtnURL, rating, starCount, reviews, and imageSource attributes are variables part of the HeroSection component.
|
In the above, the title, subTitle, primaryBtn, primaryBtnURL, secondaryBtn, secondaryBtnURL, rating, starCount, reviews, and imageSource attributes are variables part of the HeroSection component.
|
||||||
|
|
Loading…
Add table
Reference in a new issue