Skip to content

Commit 39a9e86

Browse files
committed
Add disabled prop to ButtonLink
1 parent 4b1c0dc commit 39a9e86

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/components/button-link/button-link.astro

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@
22
import type React from 'react';
33
44
export interface Props {
5-
url: string;
5+
url?: string;
66
children: React.ReactNode;
7+
disabled?: boolean;
78
className?: string;
89
secondary?: boolean;
910
isExternal?: boolean;
1011
}
1112
12-
const { url, className = "", secondary = false, isExternal } = Astro.props;
13-
const resolvedIsExternal = isExternal !== undefined ? isExternal : url.startsWith("http");
13+
const { url, className = "", secondary = false, disabled = false, isExternal} = Astro.props;
14+
const resolvedIsExternal = isExternal !== undefined ? isExternal : url?.startsWith("http");
1415
---
1516

1617
<a
1718
class={`font-bold text-lg px-4 py-4 bg-button rounded-[60px] inline-block leading-4 hover:bg-button-hover not-prose
1819
${secondary ? "bg-primary text-white hover:bg-primary-hover" : "text-text-inverted"}
1920
${secondary ? "text-text" : ""}
20-
${className || ""}`}
21+
${className || ""}
22+
${disabled ? "opacity-50 pointer-events-none" : ""}`}
2123
href={url}
2224
>
2325
<slot />

src/content/pages/programme/mentorship.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ mentee what their contribution should be (that's for the mentee to decide).
2727
## Mentors
2828

2929
<div class="text-center">
30-
<Button>Signup closed</Button>
30+
<ButtonLink disabled>Signup closed</ButtonLink>
3131
</div>
3232

3333
We expect mentors to have past speaking experience at conferences similar to
@@ -48,7 +48,7 @@ You will also be invited to join the panel of the Webinar Workshops.
4848
## Mentee
4949

5050
<div class="text-center">
51-
<Button>Signup closed</Button>
51+
<ButtonLink disabled>Signup closed</ButtonLink>
5252
</div>
5353

5454
If you require help contributing to EuroPython, especially if you are from an

0 commit comments

Comments
 (0)