-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathindex.tsx
50 lines (44 loc) · 1.1 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import React from 'react';
import styles from './styles.module.css';
import ArrowRight from '@site/static/img/arrow-right-hero.svg';
import clsx from 'clsx';
export const ButtonStyling = {
TO_PURPLE: styles.buttonTransparentStyling,
TO_WHITE: styles.buttonWhiteStyling,
TO_TRANSPARENT: styles.buttonPurpleStyling,
};
export const BorderStyling = {
PURPLE: styles.buttonPurpleBorderStyling,
};
const HomepageButton: React.FC<{
title: string;
href: string;
target?: '_blank' | '_parent' | '_self' | '_top';
backgroundStyling?: string;
borderStyling?: string;
enlarged?: boolean;
}> = ({
title,
href,
target = '_self',
backgroundStyling = ButtonStyling.TO_TRANSPARENT,
borderStyling = BorderStyling.PURPLE,
}) => {
return (
<a href={href} target={target} className={styles.homepageButtonLink}>
<div
className={clsx(
styles.homepageButton,
backgroundStyling,
borderStyling
)}
>
{title}
<div className={styles.arrow}>
<ArrowRight />
</div>
</div>
</a>
);
};
export default HomepageButton;