Skip to content

Commit ba8e0ef

Browse files
committed
feat: add subtext for action buttons
1 parent aaf40c4 commit ba8e0ef

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/components/UI/Button.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {BIG_BREAKPOINT} from "../../constants/BreakPoints";
55

66
interface ButtonProps {
77
text: string;
8+
subtext?: string;
89
link: string;
910
onClick: () => void;
1011
disabled?: boolean;
@@ -65,6 +66,7 @@ const StyledActionButton = styled.div`
6566

6667
const Button: FC<React.PropsWithChildren<ButtonProps>> = ({
6768
text,
69+
subtext = "SOON",
6870
link,
6971
onClick,
7072
disabled,
@@ -91,7 +93,7 @@ const Button: FC<React.PropsWithChildren<ButtonProps>> = ({
9193
{children}
9294
<span>{` ${text}`}</span>
9395
</a>
94-
{disabled && <small>SOON</small>}
96+
{disabled && <small>{subtext}</small>}
9597
</>
9698
</StyledActionButton>
9799
);

src/views/Home/components/ActionButtons/ActionButtons.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@ const ActionButtons: FC<React.PropsWithChildren<unknown>> = () => {
4444
<Button
4545
onClick={trackTickets}
4646
text="🎟️ Buy Tickets"
47+
subtext="February 2025"
4748
link="https://tickets.devbcn.com/event/devbcn-2025"
4849
disabled={!isBetween(ticketStartDay, ticketEndDay)}
4950
/>
5051
<Button
5152
onClick={trackCFP}
5253
text="📢 Call For Papers"
54+
subtext="January 2025"
5355
link={data.cfp.link}
5456
disabled={!isBetween(CFPStartDay, CFPEndDay)}
5557
/>

0 commit comments

Comments
 (0)