gatsby-core-theme 32.0.3 → 32.0.5
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 +8 -1
- package/src/components/molecules/newsletter/newsletter.stories.js +10 -0
- package/src/components/molecules/newsletter/success/index.js +16 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## [32.0.5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v32.0.4...v32.0.5) (2024-05-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add translation for newsletter ([5d92b06](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5d92b06755c0b3717a1b9af2c1701acf5b59e100))
|
|
7
|
+
|
|
8
|
+
## [32.0.4](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v32.0.3...v32.0.4) (2024-05-31)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Code Refactoring
|
|
12
|
+
|
|
13
|
+
* changes to newsletter ([eeb67ce](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/eeb67ceca6fc4fea273d3c73e36af4e817ac52ab))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
* Merge branch 'tm-4397-newsletter' into 'master' ([1d9353d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1d9353ddc255164bc2c86a8e740c96a23c85ce29))
|
|
17
|
+
|
|
1
18
|
## [32.0.3](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v32.0.2...v32.0.3) (2024-05-30)
|
|
2
19
|
|
|
3
20
|
|
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@ const NewsletterForm = ({
|
|
|
15
15
|
setErr,
|
|
16
16
|
path,
|
|
17
17
|
country,
|
|
18
|
+
showLabels = true,
|
|
18
19
|
}) => {
|
|
19
20
|
const [ip, setIP] = useState('');
|
|
20
21
|
const [error, setError] = useState(false);
|
|
@@ -89,6 +90,7 @@ const NewsletterForm = ({
|
|
|
89
90
|
customError
|
|
90
91
|
buttonLabel={submitText}
|
|
91
92
|
path={path}
|
|
93
|
+
showLabels={showLabels}
|
|
92
94
|
/>
|
|
93
95
|
);
|
|
94
96
|
};
|
|
@@ -100,6 +102,7 @@ NewsletterForm.propTypes = {
|
|
|
100
102
|
setErr: PropTypes.bool,
|
|
101
103
|
path: PropTypes.string,
|
|
102
104
|
country: PropTypes.string,
|
|
105
|
+
showLabels: PropTypes.bool,
|
|
103
106
|
};
|
|
104
107
|
|
|
105
108
|
export default NewsletterForm;
|
|
@@ -7,7 +7,12 @@ import Button from './toggle-button/index';
|
|
|
7
7
|
import NewsletterForm from './form/index';
|
|
8
8
|
import styles from './newsletter.module.scss';
|
|
9
9
|
|
|
10
|
-
const Newsletter = ({
|
|
10
|
+
const Newsletter = ({
|
|
11
|
+
page,
|
|
12
|
+
openBtnText = 'Unlock Bonuses',
|
|
13
|
+
isSticky = false,
|
|
14
|
+
showLabels = true,
|
|
15
|
+
}) => {
|
|
11
16
|
const [toggleNewsetter, setToggleNewsletter] = useState(false);
|
|
12
17
|
const [isClicked, setIsClicked] = useState(false);
|
|
13
18
|
const country = page?.market?.split('_')[0].toUpperCase();
|
|
@@ -53,6 +58,7 @@ const Newsletter = ({ page, openBtnText = 'Unlock Bonuses', isSticky = false })
|
|
|
53
58
|
market={page?.market}
|
|
54
59
|
path={page?.path}
|
|
55
60
|
redirectUrl={redirectUrl}
|
|
61
|
+
showLabels={showLabels}
|
|
56
62
|
/>
|
|
57
63
|
{isSticky && (
|
|
58
64
|
<MdClose
|
|
@@ -76,6 +82,7 @@ Newsletter.propTypes = {
|
|
|
76
82
|
market: PropTypes.string,
|
|
77
83
|
}),
|
|
78
84
|
isSticky: PropTypes.bool,
|
|
85
|
+
showLabels: PropTypes.bool,
|
|
79
86
|
};
|
|
80
87
|
|
|
81
88
|
export default Newsletter;
|
|
@@ -21,6 +21,16 @@ export default {
|
|
|
21
21
|
defaultValue: null,
|
|
22
22
|
description: 'The page object.',
|
|
23
23
|
},
|
|
24
|
+
showLabels: {
|
|
25
|
+
name: 'showLabels',
|
|
26
|
+
type: { name: 'boolean', required: false },
|
|
27
|
+
defaultValue: true,
|
|
28
|
+
description: 'Show form field labels',
|
|
29
|
+
table: {
|
|
30
|
+
type: { summary: 'boolean' },
|
|
31
|
+
defaultValue: { summary: true },
|
|
32
|
+
},
|
|
33
|
+
},
|
|
24
34
|
},
|
|
25
35
|
parameters: {
|
|
26
36
|
docs: {
|
|
@@ -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;
|