From 5f21db5339a62c6d26d975361af74ad5841b9a81 Mon Sep 17 00:00:00 2001 From: Sakarias Date: Thu, 10 Oct 2024 21:28:14 +0200 Subject: [PATCH] fix(button): Removed double text-color (#51) --- src/components/Box.astro | 8 ++++---- src/components/sections/CrewDescriptionComp.astro | 2 +- src/components/sections/CrewJoinComp.astro | 2 +- src/components/sections/TechBlogComp.astro | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/Box.astro b/src/components/Box.astro index 8003723..f916926 100644 --- a/src/components/Box.astro +++ b/src/components/Box.astro @@ -10,6 +10,7 @@ interface Props { textColor?: string; button?: { text: string; + textcolor?: string; link: string; color?: string; border?: boolean; @@ -29,6 +30,7 @@ const { } = Astro.props; const itemCenterProps = itemCenter ? "items-center" : "items-start"; const borderProps = button?.border ? "border-white border" : ""; +const buttonTextColor = button?.textcolor ? button.textcolor : "text-black"; ---
@@ -41,8 +43,7 @@ const borderProps = button?.border ? "border-white border" : ""; {button && ( + class={`${buttonTextColor} ${button?.color} ${borderProps} inline-block px-4 py-2 rounded-full content-center`}> {button.text} )} @@ -57,8 +58,7 @@ const borderProps = button?.border ? "border-white border" : ""; {button && ( + class={`${button?.color} ${borderProps} inline-block text-white px-4 py-2 rounded-full content-center`}> {button.text} )} diff --git a/src/components/sections/CrewDescriptionComp.astro b/src/components/sections/CrewDescriptionComp.astro index a6b09ad..f069417 100644 --- a/src/components/sections/CrewDescriptionComp.astro +++ b/src/components/sections/CrewDescriptionComp.astro @@ -23,7 +23,7 @@ const { image } = Astro.props; button={{ text: "Ta en titt på årets crewbeskrivelser", link: "https://wannabe.gathering.org/tg25/crew", - color: "bg-blue-400 self-center text-black", + color: "bg-blue-400 self-center", }} backgroundColor="bg-black bg-opacity-90" /> diff --git a/src/components/sections/CrewJoinComp.astro b/src/components/sections/CrewJoinComp.astro index 6cb72ad..dc7cf00 100644 --- a/src/components/sections/CrewJoinComp.astro +++ b/src/components/sections/CrewJoinComp.astro @@ -23,7 +23,7 @@ const { image } = Astro.props; button={{ text: "Ta utfordringen!", link: "https://wannabe.gathering.org", - color: "bg-orange-500 self-center text-black", + color: "bg-orange-500 self-center", }} backgroundColor="bg-black bg-opacity-90" /> diff --git a/src/components/sections/TechBlogComp.astro b/src/components/sections/TechBlogComp.astro index 4e6f0e1..4004775 100644 --- a/src/components/sections/TechBlogComp.astro +++ b/src/components/sections/TechBlogComp.astro @@ -23,7 +23,7 @@ const { image } = Astro.props; button={{ text: "Les alt i Tech-bloggen", link: "https://tech.gathering.org", - color: "bg-green-500 self-center text-black", + color: "bg-green-500 self-center", }} backgroundColor="bg-black bg-opacity-90" />