gatsby-core-theme 32.0.4 → 32.0.6
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.
- package/CHANGELOG.md +17 -0
- package/package.json +1 -1
- package/src/components/molecules/newsletter/form/index.js +3 -0
- package/src/components/molecules/newsletter/index.js +3 -0
- package/src/components/molecules/newsletter/success/index.js +16 -12
- package/src/components/organisms/form/form.module.scss +1 -1
- package/src/components/organisms/form/index.js +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## [32.0.6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v32.0.5...v32.0.6) (2024-06-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Code Refactoring
|
|
5
|
+
|
|
6
|
+
* change to title tag in newsletter ([59dc282](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/59dc282ba7aab3b620ffceb94745e206e460bf59))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
* Merge branch 'tm-4397-newsletter' into 'master' ([00bb7dd](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/00bb7ddec8b30e57063cb89370e0087164462b20))
|
|
10
|
+
|
|
11
|
+
## [32.0.5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v32.0.4...v32.0.5) (2024-05-31)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* add translation for newsletter ([5d92b06](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5d92b06755c0b3717a1b9af2c1701acf5b59e100))
|
|
17
|
+
|
|
1
18
|
## [32.0.4](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v32.0.3...v32.0.4) (2024-05-31)
|
|
2
19
|
|
|
3
20
|
|
package/package.json
CHANGED
|
@@ -16,6 +16,7 @@ const NewsletterForm = ({
|
|
|
16
16
|
path,
|
|
17
17
|
country,
|
|
18
18
|
showLabels = true,
|
|
19
|
+
titleType = 'h2',
|
|
19
20
|
}) => {
|
|
20
21
|
const [ip, setIP] = useState('');
|
|
21
22
|
const [error, setError] = useState(false);
|
|
@@ -91,6 +92,7 @@ const NewsletterForm = ({
|
|
|
91
92
|
buttonLabel={submitText}
|
|
92
93
|
path={path}
|
|
93
94
|
showLabels={showLabels}
|
|
95
|
+
titleType={titleType}
|
|
94
96
|
/>
|
|
95
97
|
);
|
|
96
98
|
};
|
|
@@ -103,6 +105,7 @@ NewsletterForm.propTypes = {
|
|
|
103
105
|
path: PropTypes.string,
|
|
104
106
|
country: PropTypes.string,
|
|
105
107
|
showLabels: PropTypes.bool,
|
|
108
|
+
titleType: PropTypes.string,
|
|
106
109
|
};
|
|
107
110
|
|
|
108
111
|
export default NewsletterForm;
|
|
@@ -12,6 +12,7 @@ const Newsletter = ({
|
|
|
12
12
|
openBtnText = 'Unlock Bonuses',
|
|
13
13
|
isSticky = false,
|
|
14
14
|
showLabels = true,
|
|
15
|
+
titleType = 'p',
|
|
15
16
|
}) => {
|
|
16
17
|
const [toggleNewsetter, setToggleNewsletter] = useState(false);
|
|
17
18
|
const [isClicked, setIsClicked] = useState(false);
|
|
@@ -59,6 +60,7 @@ const Newsletter = ({
|
|
|
59
60
|
path={page?.path}
|
|
60
61
|
redirectUrl={redirectUrl}
|
|
61
62
|
showLabels={showLabels}
|
|
63
|
+
titleType={titleType}
|
|
62
64
|
/>
|
|
63
65
|
{isSticky && (
|
|
64
66
|
<MdClose
|
|
@@ -83,6 +85,7 @@ Newsletter.propTypes = {
|
|
|
83
85
|
}),
|
|
84
86
|
isSticky: PropTypes.bool,
|
|
85
87
|
showLabels: PropTypes.bool,
|
|
88
|
+
titleType: PropTypes.string,
|
|
86
89
|
};
|
|
87
90
|
|
|
88
91
|
export default Newsletter;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
2
|
import { IoMdCheckmarkCircleOutline } from '@react-icons/all-files/io/IoMdCheckmarkCircleOutline';
|
|
3
|
-
|
|
3
|
+
import { Context } from 'gatsby-core-theme/src/context/MainProvider';
|
|
4
|
+
import { translate } from 'gatsby-core-theme/src/helpers/getters';
|
|
4
5
|
import Modal from '~atoms/modal';
|
|
5
6
|
|
|
6
7
|
const index = ({
|
|
@@ -9,15 +10,18 @@ const index = ({
|
|
|
9
10
|
section: 'Now there are lots of extra goodies that are on their way to your inbox.',
|
|
10
11
|
footer: 'All the best and good luck in the casino world!',
|
|
11
12
|
},
|
|
12
|
-
}) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
{text.
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
}) => {
|
|
14
|
+
const { translations } = useContext(Context) || {};
|
|
15
|
+
return (
|
|
16
|
+
<Modal>
|
|
17
|
+
<IoMdCheckmarkCircleOutline color="green" title="Check Icon" />
|
|
18
|
+
<p>{translate(translations, 'newsletter_success_title', text.title)}</p>
|
|
19
|
+
<div>
|
|
20
|
+
{translate(translations, 'newsletter_success_section', text.section)}
|
|
21
|
+
<p>{translate(translations, 'newsletter_success_footer', text.footer)}</p>
|
|
22
|
+
</div>
|
|
23
|
+
</Modal>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
22
26
|
|
|
23
27
|
export default index;
|
|
@@ -22,6 +22,7 @@ const FormComponent = ({
|
|
|
22
22
|
customeSubmit = null,
|
|
23
23
|
customError = false,
|
|
24
24
|
path = '',
|
|
25
|
+
titleType = 'h2',
|
|
25
26
|
}) => {
|
|
26
27
|
const { translations } = useContext(Context) || {};
|
|
27
28
|
const recaptchaRef = useRef();
|
|
@@ -107,10 +108,12 @@ const FormComponent = ({
|
|
|
107
108
|
// form not specified on constant
|
|
108
109
|
if (!Object.keys(formOptions).length) return;
|
|
109
110
|
|
|
111
|
+
const TitleTag = titleType || 'h2';
|
|
112
|
+
|
|
110
113
|
return (
|
|
111
114
|
<div className={`${styles.formComponent || ''} `}>
|
|
112
115
|
{formOptions?.title && (
|
|
113
|
-
<
|
|
116
|
+
<TitleTag className={styles.title}>
|
|
114
117
|
{translate(
|
|
115
118
|
translations,
|
|
116
119
|
translations && translations[`${path}_${formOptions.title?.translationKey}`]
|
|
@@ -118,7 +121,7 @@ const FormComponent = ({
|
|
|
118
121
|
: formOptions.title?.translationKey,
|
|
119
122
|
formOptions.title?.label
|
|
120
123
|
)}
|
|
121
|
-
</
|
|
124
|
+
</TitleTag>
|
|
122
125
|
)}
|
|
123
126
|
{formOptions?.description && (
|
|
124
127
|
<p>
|
|
@@ -227,5 +230,6 @@ FormComponent.propTypes = {
|
|
|
227
230
|
customError: PropTypes.bool,
|
|
228
231
|
customeSubmit: PropTypes.func,
|
|
229
232
|
path: PropTypes.string,
|
|
233
|
+
titleType: PropTypes.string,
|
|
230
234
|
};
|
|
231
235
|
export default FormComponent;
|