From f2e08f2bbe96c41c6251c846a07f2b2c1a34b926 Mon Sep 17 00:00:00 2001 From: Andrei Liviu Georgescu <146103342+andreilgeorgescu@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:31:59 +0000 Subject: [PATCH] Correctly use `GradientOption` type --- src/components/GradientSelect.astro | 2 +- src/components/Section.astro | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/GradientSelect.astro b/src/components/GradientSelect.astro index e8993edd..f71f07fc 100644 --- a/src/components/GradientSelect.astro +++ b/src/components/GradientSelect.astro @@ -12,7 +12,7 @@ export type GradientOption = 1 | 2 | 3; interface Props { color: CollectionEntry<"courseCategories">["data"]["color"]; gradientFlipped?: boolean; - gradientOption?: GradientOption; + gradientOption: GradientOption; title?: string; showGradient?: boolean; } diff --git a/src/components/Section.astro b/src/components/Section.astro index 36ac5e2d..bbcee00d 100644 --- a/src/components/Section.astro +++ b/src/components/Section.astro @@ -1,12 +1,13 @@ --- +import type { GradientOption } from "@components/GradientSelect.astro"; +import GradientSelect from "@components/GradientSelect.astro"; import type { CollectionEntry } from "astro:content"; -import GradientSelect from "./GradientSelect.astro"; import H2 from "./H2.astro"; interface Props { color: CollectionEntry<"courseCategories">["data"]["color"]; gradientFlipped?: boolean; - gradientOption?: string; + gradientOption?: GradientOption; title?: string; }