gatsby-core-theme 32.0.5 → 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
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
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
|
+
|
|
1
11
|
## [32.0.5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v32.0.4...v32.0.5) (2024-05-31)
|
|
2
12
|
|
|
3
13
|
|
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;
|
|
@@ -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;
|