foundry-component-library 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17,12 +17,16 @@ function Contacts({
|
|
|
17
17
|
email: string;
|
|
18
18
|
}[];
|
|
19
19
|
}) {
|
|
20
|
-
const [
|
|
21
|
-
const
|
|
20
|
+
const [isTypeform1Open, setIsTypeform1Open] = useState(false);
|
|
21
|
+
const [isTypeform2Open, setIsTypeform2Open] = useState(false);
|
|
22
|
+
const ref = useClickOutside<HTMLDivElement>(() => {
|
|
23
|
+
setIsTypeform1Open(false);
|
|
24
|
+
setIsTypeform2Open(false);
|
|
25
|
+
});
|
|
22
26
|
if (!items) return;
|
|
23
27
|
|
|
24
28
|
return (
|
|
25
|
-
<section className={styles.section}>
|
|
29
|
+
<section className={styles.section} id="contact-us">
|
|
26
30
|
<Container>
|
|
27
31
|
<h2 className={styles.title}>{title}</h2>
|
|
28
32
|
<div className={styles.boxes}>
|
|
@@ -44,8 +48,13 @@ function Contacts({
|
|
|
44
48
|
</div>
|
|
45
49
|
<a
|
|
46
50
|
className={styles.buttonSecondary}
|
|
47
|
-
onClick={() =>
|
|
48
|
-
|
|
51
|
+
onClick={() => {
|
|
52
|
+
if (i === 2) {
|
|
53
|
+
setIsTypeform1Open(true);
|
|
54
|
+
} else {
|
|
55
|
+
setIsTypeform2Open(true);
|
|
56
|
+
}
|
|
57
|
+
}}>
|
|
49
58
|
{i === 0 && "Contact Account"}
|
|
50
59
|
{i === 1 && "General Contact"}
|
|
51
60
|
{i === 2 && "Contact HR"}
|
|
@@ -57,8 +66,7 @@ function Contacts({
|
|
|
57
66
|
</div>
|
|
58
67
|
<div
|
|
59
68
|
className={styles.typeform}
|
|
60
|
-
style={{ display:
|
|
61
|
-
>
|
|
69
|
+
style={{ display: isTypeform1Open ? "flex" : "none" }}>
|
|
62
70
|
<Script src="//embed.typeform.com/next/embed.js" />
|
|
63
71
|
<div ref={ref} className={styles.typeformWrapper}>
|
|
64
72
|
{/* <div data-tf-widget="qmv6Yk" data-tf-iframe-props="title=Foundry Website Contact Form" data-tf-medium="snippet" style={{ width: '100%', height: '400px' }} /> */}
|
|
@@ -70,6 +78,20 @@ function Contacts({
|
|
|
70
78
|
/>
|
|
71
79
|
</div>
|
|
72
80
|
</div>
|
|
81
|
+
<div
|
|
82
|
+
className={styles.typeform}
|
|
83
|
+
style={{ display: isTypeform2Open ? "flex" : "none" }}>
|
|
84
|
+
<Script src="//embed.typeform.com/next/embed.js" />
|
|
85
|
+
<div ref={ref} className={styles.typeformWrapper}>
|
|
86
|
+
{/* <div data-tf-widget="qmv6Yk" data-tf-iframe-props="title=Foundry Website Contact Form" data-tf-medium="snippet" style={{ width: '100%', height: '400px' }} /> */}
|
|
87
|
+
<div
|
|
88
|
+
data-tf-widget="qmv6Yk"
|
|
89
|
+
data-tf-iframe-props="title=Foundry Website Contact Form"
|
|
90
|
+
data-tf-medium="snippet"
|
|
91
|
+
style={{ width: "100%", height: "400px" }}
|
|
92
|
+
/>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
73
95
|
</Container>
|
|
74
96
|
</section>
|
|
75
97
|
);
|