Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(button): Removed double text-color #51

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/components/Box.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface Props {
textColor?: string;
button?: {
text: string;
textcolor?: string;
link: string;
color?: string;
border?: boolean;
Expand All @@ -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";
---

<div class={`${backgroundColor} p-4 rounded-xl flex flex-col space-y-2 `}>
Expand All @@ -41,8 +43,7 @@ const borderProps = button?.border ? "border-white border" : "";
{button && (
<a
href={button.link}
class={`${button?.color} ${borderProps} inline-block text-white px-4 py-2 rounded-full content-center`}
>
class={`${buttonTextColor} ${button?.color} ${borderProps} inline-block px-4 py-2 rounded-full content-center`}>
{button.text}
</a>
)}
Expand All @@ -57,8 +58,7 @@ const borderProps = button?.border ? "border-white border" : "";
{button && (
<a
href={button.link}
class={`${button?.color} ${borderProps} inline-block text-white px-4 py-2 rounded-full content-center`}
>
class={`${button?.color} ${borderProps} inline-block text-white px-4 py-2 rounded-full content-center`}>
{button.text}
</a>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/sections/CrewDescriptionComp.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/sections/CrewJoinComp.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/sections/TechBlogComp.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down