gatsby-matrix-theme 2.0.5 → 2.2.0
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/.storybook/main.js +1 -0
- package/CHANGELOG.md +102 -0
- package/jest.config.js +1 -0
- package/package.json +2 -2
- package/src/components/atoms/cards/article-card/index.js +9 -6
- package/src/components/atoms/cards/author-card/index.js +6 -1
- package/src/components/atoms/cards/base-card/index.js +1 -1
- package/src/components/atoms/cards/game-card/index.js +9 -6
- package/src/components/atoms/cards/operator-card/index.js +14 -8
- package/src/components/atoms/cards/payment-method-card/index.js +11 -9
- package/src/components/atoms/cards/popup-card/index.js +5 -5
- package/src/components/atoms/cards/popup-card/popup-card.module.scss +6 -7
- package/src/components/atoms/cards/popup-card/popup-card.stories.js +0 -10
- package/src/components/atoms/cards/software-provider-card/index.js +10 -9
- package/src/components/atoms/link-menu/index.js +1 -1
- package/src/components/atoms/modal/modal.module.scss +44 -41
- package/src/components/atoms/newsletter/success/index.js +18 -13
- package/src/components/atoms/operator-bonuses/index.js +10 -7
- package/src/components/atoms/search/autocomplete/article.js +1 -1
- package/src/components/atoms/search/autocomplete/game.js +1 -1
- package/src/components/atoms/search/autocomplete/operator.js +1 -1
- package/src/components/atoms/search/autocomplete/payment_methods.js +1 -1
- package/src/components/atoms/search/autocomplete/software_provider.js +1 -1
- package/src/components/atoms/table/banking/index.js +24 -20
- package/src/components/atoms/table/column/index.js +2 -5
- package/src/components/atoms/table/staticColumn/index.js +28 -33
- package/src/components/molecules/faq/faq.module.scss +14 -10
- package/src/components/molecules/faq/index.js +1 -1
- package/src/components/molecules/game-iframe/index.js +6 -1
- package/src/components/molecules/game-score-gauge/game-score-gauge.stories.js +7 -12
- package/src/components/molecules/game-score-gauge/index.js +4 -2
- package/src/components/molecules/info-grid/index.js +1 -0
- package/src/components/molecules/newsletter/index.js +1 -0
- package/src/components/molecules/newsletter/newsletter.stories.js +106 -112
- package/src/components/molecules/newsletter-optin/index.js +7 -7
- package/src/components/molecules/newsletter-optin/newsletter-optin.stories.js +79 -80
- package/src/components/molecules/operator-summary/index.js +8 -2
- package/src/components/molecules/small-welcome-bonus/index.js +19 -6
- package/src/components/molecules/small-welcome-bonus/small-welcome-bonus.stories.js +49 -53
- package/src/components/molecules/toplist/row/variant-one.js +26 -10
- package/src/components/organisms/footer-navigation/index.js +9 -1
- package/src/components/organisms/popup/index.js +9 -6
- package/src/components/organisms/popup/popup.stories.js +0 -10
- package/src/components/organisms/toplist/comparison-table/index.js +11 -13
- package/src/components/organisms/toplist/index.js +2 -4
- package/src/components/organisms/toplist/list/index.js +11 -7
- package/src/components/organisms/toplist/list/list.module.scss +7 -0
- package/src/gatsby-core-theme/components/atoms/bonus/bonus.module.scss +15 -0
- package/src/gatsby-core-theme/components/atoms/bonus/index.js +4 -3
- package/src/gatsby-core-theme/components/atoms/module-title/index.js +7 -9
- package/src/gatsby-core-theme/components/atoms/not-found/index.js +24 -0
- package/src/gatsby-core-theme/components/atoms/not-found/not-found.module.scss +17 -0
- package/src/gatsby-core-theme/components/atoms/spotlights/index.js +25 -8
- package/src/gatsby-core-theme/components/molecules/content/content.module.scss +73 -16
- package/src/gatsby-core-theme/components/molecules/content/index.js +2 -0
- package/src/gatsby-core-theme/components/molecules/footer/index.js +5 -1
- package/src/gatsby-core-theme/components/molecules/main/index.js +6 -1
- package/src/gatsby-core-theme/components/molecules/module/index.js +1 -3
- package/src/gatsby-core-theme/components/molecules/search/index.js +28 -4
- package/src/gatsby-core-theme/components/organisms/anchor/anchor.module.scss +5 -1
- package/src/gatsby-core-theme/components/organisms/anchor/index.js +11 -2
- package/src/gatsby-core-theme/components/organisms/carousel/index.js +17 -6
- package/src/gatsby-core-theme/components/organisms/navigation/index.js +2 -2
- package/src/gatsby-core-theme/components/organisms/search/index.js +2 -1
- package/src/gatsby-core-theme/components/pages/body/index.js +14 -9
- package/src/gatsby-core-theme/components/pages/search/index.js +79 -74
- package/src/hooks/tabs/index.js +6 -4
- package/src/hooks/tabs/tab/tab-list.js +4 -1
- package/src/hooks/tabs/tab/tab.js +37 -28
- package/storybook/public/{0.50c23d5b.iframe.bundle.js → 0.a5c4cf9f.iframe.bundle.js} +1 -1
- package/storybook/public/{1.eef04bc1.iframe.bundle.js → 1.b2b72c50.iframe.bundle.js} +1 -1
- package/storybook/public/{10.454cae2f.iframe.bundle.js → 10.502b5ac2.iframe.bundle.js} +1 -1
- package/storybook/public/{11.6ec11208.iframe.bundle.js → 11.30535586.iframe.bundle.js} +1 -1
- package/storybook/public/{5.5635a723.iframe.bundle.js → 5.66b5b921.iframe.bundle.js} +3 -3
- package/storybook/public/{5.5635a723.iframe.bundle.js.LICENSE.txt → 5.66b5b921.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/5.66b5b921.iframe.bundle.js.map +1 -0
- package/storybook/public/{6.a0f625e4.iframe.bundle.js → 6.89431426.iframe.bundle.js} +1 -1
- package/storybook/public/{7.4b9a5033.iframe.bundle.js → 7.a53e817b.iframe.bundle.js} +1 -1
- package/storybook/public/8.e043e6dc.iframe.bundle.js +3 -0
- package/storybook/public/{8.4148b63e.iframe.bundle.js.LICENSE.txt → 8.e043e6dc.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/8.e043e6dc.iframe.bundle.js.map +1 -0
- package/storybook/public/{9.08fee7fe.iframe.bundle.js → 9.eba0e7c0.iframe.bundle.js} +1 -1
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.c07025f4.iframe.bundle.js +1 -0
- package/storybook/public/{runtime~main.d64660ee.iframe.bundle.js → runtime~main.c4f3a4d6.iframe.bundle.js} +1 -1
- package/storybook/public/vendors~main.8050786b.iframe.bundle.js +7 -0
- package/storybook/public/{vendors~main.aac219e4.iframe.bundle.js.LICENSE.txt → vendors~main.8050786b.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/vendors~main.8050786b.iframe.bundle.js.map +1 -0
- package/src/components/atoms/newsletter/success/success.module.scss +0 -28
- package/src/gatsby-core-theme/pages/404/index.js +0 -66
- package/storybook/public/5.5635a723.iframe.bundle.js.map +0 -1
- package/storybook/public/8.4148b63e.iframe.bundle.js +0 -3
- package/storybook/public/8.4148b63e.iframe.bundle.js.map +0 -1
- package/storybook/public/main.e82d53bf.iframe.bundle.js +0 -1
- package/storybook/public/vendors~main.aac219e4.iframe.bundle.js +0 -7
- package/storybook/public/vendors~main.aac219e4.iframe.bundle.js.map +0 -1
|
@@ -1,123 +1,117 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
Title,
|
|
5
|
+
Description,
|
|
6
|
+
Primary,
|
|
7
|
+
PRIMARY_STORY,
|
|
8
|
+
ArgsTable,
|
|
8
9
|
} from '@storybook/addon-docs/blocks';
|
|
9
10
|
|
|
10
11
|
import Newsletter from '.';
|
|
11
12
|
|
|
12
13
|
export default {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
mainText: {
|
|
23
|
-
name: 'mainText',
|
|
24
|
-
type: { name: 'String', required: false },
|
|
25
|
-
defaultValue: '',
|
|
26
|
-
description: 'Main text',
|
|
27
|
-
},
|
|
28
|
-
subscribeText: {
|
|
29
|
-
name: 'subscribeText',
|
|
30
|
-
type: { name: 'String', required: false },
|
|
31
|
-
defaultValue: '',
|
|
32
|
-
description: 'Subscribe Text',
|
|
33
|
-
},
|
|
34
|
-
placeholderName: {
|
|
35
|
-
name: 'placeholderName',
|
|
36
|
-
type: { name: 'String', required: false },
|
|
37
|
-
defaultValue: '',
|
|
38
|
-
description: 'Placeholder Name',
|
|
39
|
-
},
|
|
40
|
-
placeholderEmail: {
|
|
41
|
-
name: 'placeholderEmail',
|
|
42
|
-
type: { name: 'String', required: false },
|
|
43
|
-
defaultValue: '',
|
|
44
|
-
description: 'Placeholder Email',
|
|
45
|
-
},
|
|
46
|
-
privacyText: {
|
|
47
|
-
name: 'privacyText',
|
|
48
|
-
type: { name: 'String', required: false },
|
|
49
|
-
defaultValue: '',
|
|
50
|
-
description: 'Privacy Text',
|
|
51
|
-
},
|
|
52
|
-
openBtnText: {
|
|
53
|
-
name: 'openBtnText',
|
|
54
|
-
type: { name: 'String', required: false },
|
|
55
|
-
defaultValue: '',
|
|
56
|
-
description: 'Open Button Text',
|
|
57
|
-
},
|
|
58
|
-
buttonText: {
|
|
59
|
-
name: 'buttonText',
|
|
60
|
-
type: { name: 'String', required: false },
|
|
61
|
-
defaultValue: '',
|
|
62
|
-
description: 'Button Text',
|
|
63
|
-
},
|
|
64
|
-
formAction: {
|
|
65
|
-
name: 'formAction',
|
|
66
|
-
type: { name: 'String', required: false },
|
|
67
|
-
defaultValue: '',
|
|
68
|
-
description: 'Form Action',
|
|
69
|
-
},
|
|
70
|
-
newsletterListId: {
|
|
71
|
-
name: 'newsletterListId',
|
|
72
|
-
type: { name: 'String', required: false },
|
|
73
|
-
defaultValue: '',
|
|
74
|
-
description: 'Newsletter List Id',
|
|
75
|
-
},
|
|
76
|
-
footer: {
|
|
77
|
-
name: 'footer',
|
|
78
|
-
type: { name: 'boolean', required: true },
|
|
79
|
-
defaultValue: false,
|
|
80
|
-
description: 'Footer Newsletter',
|
|
81
|
-
},
|
|
14
|
+
title: 'Matrix-Theme/Molecules/Newsletter',
|
|
15
|
+
component: Newsletter,
|
|
16
|
+
argTypes: {
|
|
17
|
+
page: {
|
|
18
|
+
name: 'page',
|
|
19
|
+
type: { name: 'object', required: true },
|
|
20
|
+
defaultValue: null,
|
|
21
|
+
description: 'The page object.',
|
|
82
22
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
},
|
|
89
|
-
page: () => (
|
|
90
|
-
<>
|
|
91
|
-
<Title />
|
|
92
|
-
<Description />
|
|
93
|
-
<Primary />
|
|
94
|
-
<ArgsTable story={PRIMARY_STORY} />
|
|
95
|
-
</>
|
|
96
|
-
),
|
|
97
|
-
},
|
|
23
|
+
mainText: {
|
|
24
|
+
name: 'mainText',
|
|
25
|
+
type: { name: 'String', required: false },
|
|
26
|
+
defaultValue: '',
|
|
27
|
+
description: 'Main text',
|
|
98
28
|
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
29
|
+
subscribeText: {
|
|
30
|
+
name: 'subscribeText',
|
|
31
|
+
type: { name: 'String', required: false },
|
|
32
|
+
defaultValue: '',
|
|
33
|
+
description: 'Subscribe Text',
|
|
34
|
+
},
|
|
35
|
+
placeholderName: {
|
|
36
|
+
name: 'placeholderName',
|
|
37
|
+
type: { name: 'String', required: false },
|
|
38
|
+
defaultValue: '',
|
|
39
|
+
description: 'Placeholder Name',
|
|
40
|
+
},
|
|
41
|
+
placeholderEmail: {
|
|
42
|
+
name: 'placeholderEmail',
|
|
43
|
+
type: { name: 'String', required: false },
|
|
44
|
+
defaultValue: '',
|
|
45
|
+
description: 'Placeholder Email',
|
|
46
|
+
},
|
|
47
|
+
privacyText: {
|
|
48
|
+
name: 'privacyText',
|
|
49
|
+
type: { name: 'String', required: false },
|
|
50
|
+
defaultValue: '',
|
|
51
|
+
description: 'Privacy Text',
|
|
52
|
+
},
|
|
53
|
+
openBtnText: {
|
|
54
|
+
name: 'openBtnText',
|
|
55
|
+
type: { name: 'String', required: false },
|
|
56
|
+
defaultValue: '',
|
|
57
|
+
description: 'Open Button Text',
|
|
58
|
+
},
|
|
59
|
+
buttonText: {
|
|
60
|
+
name: 'buttonText',
|
|
61
|
+
type: { name: 'String', required: false },
|
|
62
|
+
defaultValue: '',
|
|
63
|
+
description: 'Button Text',
|
|
64
|
+
},
|
|
65
|
+
formAction: {
|
|
66
|
+
name: 'formAction',
|
|
67
|
+
type: { name: 'String', required: false },
|
|
68
|
+
defaultValue: '',
|
|
69
|
+
description: 'Form Action',
|
|
70
|
+
},
|
|
71
|
+
newsletterListId: {
|
|
72
|
+
name: 'newsletterListId',
|
|
73
|
+
type: { name: 'String', required: false },
|
|
74
|
+
defaultValue: '',
|
|
75
|
+
description: 'Newsletter List Id',
|
|
76
|
+
},
|
|
77
|
+
footer: {
|
|
78
|
+
name: 'footer',
|
|
79
|
+
type: { name: 'boolean', required: true },
|
|
80
|
+
defaultValue: false,
|
|
81
|
+
description: 'Footer Newsletter',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
parameters: {
|
|
85
|
+
docs: {
|
|
86
|
+
description: {
|
|
87
|
+
component: 'Newsletter component',
|
|
110
88
|
},
|
|
89
|
+
page: () => (
|
|
90
|
+
<>
|
|
91
|
+
<Title />
|
|
92
|
+
<Description />
|
|
93
|
+
<Primary />
|
|
94
|
+
<ArgsTable story={PRIMARY_STORY} />
|
|
95
|
+
</>
|
|
96
|
+
),
|
|
111
97
|
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const Template = (args) => <Newsletter {...args} />;
|
|
102
|
+
|
|
103
|
+
export const Default = Template.bind({});
|
|
104
|
+
Default.args = {
|
|
105
|
+
page: {},
|
|
106
|
+
mainText: 'You get more than 405 free spins',
|
|
107
|
+
subscribeText: 'Subscribe to our newsletter and get more than 405 free spins instantly.',
|
|
108
|
+
placeholderName: 'Name',
|
|
109
|
+
placeholderEmail: 'Email',
|
|
110
|
+
privacyText:
|
|
111
|
+
'By subscribing, you confirm that you are over 18 years of age and that you accept our',
|
|
112
|
+
openBtnText: 'FÅ 405 FREE SPINS UMIDDELBART',
|
|
113
|
+
buttonText: 'Hent dine freespins',
|
|
114
|
+
formAction: '',
|
|
115
|
+
newsletterListId: '',
|
|
116
|
+
footer: false,
|
|
117
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/* eslint-disable react/no-danger */
|
|
2
2
|
/* eslint-disable no-unused-expressions */
|
|
3
3
|
/* eslint-disable react/prop-types */
|
|
4
|
-
import React, { useRef, useState } from 'react';
|
|
4
|
+
import React, { useRef, useState, useContext } from 'react';
|
|
5
5
|
import { translate } from 'gatsby-core-theme/src/helpers/getters';
|
|
6
|
+
import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
|
|
6
7
|
import styles from './newsletter-optin.module.scss';
|
|
7
8
|
|
|
8
9
|
export default function Newsletter({
|
|
9
|
-
page,
|
|
10
10
|
title = 'Exclusive Casino Offers and Free Spins straight to your Inbox',
|
|
11
11
|
description = 'Subscribe below to be the first to get notified of exclusive casino offers, free spins and bonuses - conveniently via email or SMS. We won’t flood your inbox, but just give you the good stuff in the right way!',
|
|
12
12
|
terms = 'I confirm that I am 18+ years old and Irish resident.',
|
|
13
|
-
privacyText = 'Read our <a href="/privacy-policy">Privacy Policy</a> for more details.',
|
|
13
|
+
privacyText = 'Read our <a class="newsletter-gtm" href="/privacy-policy">Privacy Policy</a> for more details.',
|
|
14
14
|
}) {
|
|
15
15
|
const form = useRef(null);
|
|
16
|
-
|
|
16
|
+
const { translations } = useContext(Context) || {};
|
|
17
17
|
const onSubmit = (e) => {
|
|
18
18
|
e.preventDefault();
|
|
19
19
|
// validationForm(e.target.elements) && form.current.submit();
|
|
@@ -70,17 +70,17 @@ export default function Newsletter({
|
|
|
70
70
|
<p>{description}</p>
|
|
71
71
|
<form action="" method="post" ref={form} onSubmit={onSubmit}>
|
|
72
72
|
<input
|
|
73
|
-
placeholder={translate(
|
|
73
|
+
placeholder={translate(translations, 'first_name', 'First Name')}
|
|
74
74
|
type="text"
|
|
75
75
|
name="name"
|
|
76
76
|
/>
|
|
77
77
|
<input
|
|
78
|
-
placeholder={translate(
|
|
78
|
+
placeholder={translate(translations, 'email', 'E-Mail')}
|
|
79
79
|
type="email"
|
|
80
80
|
name="email"
|
|
81
81
|
/>
|
|
82
82
|
<input
|
|
83
|
-
placeholder={translate(
|
|
83
|
+
placeholder={translate(translations, 'phone_number', 'Phone Number')}
|
|
84
84
|
type="text"
|
|
85
85
|
name="phone"
|
|
86
86
|
/>
|
|
@@ -1,97 +1,96 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
Title,
|
|
5
|
+
Description,
|
|
6
|
+
Primary,
|
|
7
|
+
PRIMARY_STORY,
|
|
8
|
+
ArgsTable,
|
|
8
9
|
} from '@storybook/addon-docs/blocks';
|
|
9
10
|
|
|
10
11
|
import Newsletter from '.';
|
|
11
12
|
|
|
12
13
|
export default {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
title: {
|
|
27
|
-
name: 'title',
|
|
28
|
-
type: { name: 'string', required: false },
|
|
29
|
-
defaultValue: 'Exclusive Casino Offers and Free Spins straight to your Inbox',
|
|
30
|
-
description: `This text message will show on top of Newsletter as a title.`,
|
|
31
|
-
table: {
|
|
32
|
-
type: { summary: 'string' },
|
|
33
|
-
defaultValue: { summary: 'Exclusive Casino Offers and Free Spins straight to your Inbox' },
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
description: {
|
|
37
|
-
name: 'description',
|
|
38
|
-
defaultValue: 'Subscribe below to be the first to get notified of exclusive casino offers, free spins and bonuses - conveniently via email or SMS. We won’t flood your inbox, but just give you the good stuff in the right way!',
|
|
39
|
-
description: `This text message will be shown below the title.`,
|
|
40
|
-
table: {
|
|
41
|
-
type: {summary: 'string'},
|
|
42
|
-
defaultValue: {summary: 'Subscribe below to be the first to get notified of exclusive casino offers, free spins and bonuses - conveniently via email or SMS. We won’t flood your inbox, but just give you the good stuff in the right way!'}
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
terms: {
|
|
46
|
-
name : 'terms',
|
|
47
|
-
defaultValue: 'I confirm that I am 18+ years old and Irish resident.',
|
|
48
|
-
description: `This text message shows Terms and Conditions.`,
|
|
49
|
-
table: {
|
|
50
|
-
type: {summary: 'string'},
|
|
51
|
-
defaultValue: {summary: 'I confirm that I am 18+ years old and Irish resident.'}
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
privacy_text: {
|
|
55
|
-
name: 'privacy_text',
|
|
56
|
-
defaultValue: 'Read our Privacy Policy for more details.',
|
|
57
|
-
description: `This text message shows the URL for Privacy Policy.`,
|
|
58
|
-
table: {
|
|
59
|
-
type: {summary: 'string'},
|
|
60
|
-
defaultValue: {summary: 'Read our Privacy Policy for more details.'}
|
|
61
|
-
},
|
|
62
|
-
},
|
|
14
|
+
title: 'Matrix-Theme/Molecules/Newsletter Optin',
|
|
15
|
+
component: Newsletter,
|
|
16
|
+
argTypes: {
|
|
17
|
+
page: {
|
|
18
|
+
name: 'page',
|
|
19
|
+
type: { name: 'object', required: true },
|
|
20
|
+
defaultValue: null,
|
|
21
|
+
description: 'The page object.',
|
|
22
|
+
table: {
|
|
23
|
+
type: { summary: 'object' },
|
|
24
|
+
defaultValue: { summary: null },
|
|
25
|
+
},
|
|
63
26
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
27
|
+
title: {
|
|
28
|
+
name: 'title',
|
|
29
|
+
type: { name: 'string', required: false },
|
|
30
|
+
defaultValue: 'Exclusive Casino Offers and Free Spins straight to your Inbox',
|
|
31
|
+
description: `This text message will show on top of Newsletter as a title.`,
|
|
32
|
+
table: {
|
|
33
|
+
type: { summary: 'string' },
|
|
34
|
+
defaultValue: { summary: 'Exclusive Casino Offers and Free Spins straight to your Inbox' },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
description: {
|
|
38
|
+
name: 'description',
|
|
39
|
+
defaultValue:
|
|
40
|
+
'Subscribe below to be the first to get notified of exclusive casino offers, free spins and bonuses - conveniently via email or SMS. We won’t flood your inbox, but just give you the good stuff in the right way!',
|
|
41
|
+
description: `This text message will be shown below the title.`,
|
|
42
|
+
table: {
|
|
43
|
+
type: { summary: 'string' },
|
|
44
|
+
defaultValue: {
|
|
45
|
+
summary:
|
|
46
|
+
'Subscribe below to be the first to get notified of exclusive casino offers, free spins and bonuses - conveniently via email or SMS. We won’t flood your inbox, but just give you the good stuff in the right way!',
|
|
78
47
|
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
terms: {
|
|
51
|
+
name: 'terms',
|
|
52
|
+
defaultValue: 'I confirm that I am 18+ years old and Irish resident.',
|
|
53
|
+
description: `This text message shows Terms and Conditions.`,
|
|
54
|
+
table: {
|
|
55
|
+
type: { summary: 'string' },
|
|
56
|
+
defaultValue: { summary: 'I confirm that I am 18+ years old and Irish resident.' },
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
privacy_text: {
|
|
60
|
+
name: 'privacy_text',
|
|
61
|
+
defaultValue: 'Read our Privacy Policy for more details.',
|
|
62
|
+
description: `This text message shows the URL for Privacy Policy.`,
|
|
63
|
+
table: {
|
|
64
|
+
type: { summary: 'string' },
|
|
65
|
+
defaultValue: { summary: 'Read our Privacy Policy for more details.' },
|
|
66
|
+
},
|
|
79
67
|
},
|
|
68
|
+
},
|
|
69
|
+
parameters: {
|
|
70
|
+
docs: {
|
|
71
|
+
description: {
|
|
72
|
+
component: 'Generates Newsletter Optin form on PPC pages.',
|
|
73
|
+
},
|
|
74
|
+
page: () => (
|
|
75
|
+
<>
|
|
76
|
+
<Title />
|
|
77
|
+
<Description />
|
|
78
|
+
<Primary />
|
|
79
|
+
<ArgsTable story={PRIMARY_STORY} />
|
|
80
|
+
</>
|
|
81
|
+
),
|
|
82
|
+
},
|
|
83
|
+
},
|
|
80
84
|
};
|
|
81
85
|
|
|
82
86
|
const Template = (args) => <Newsletter {...args} />;
|
|
83
87
|
|
|
84
88
|
export const Default = Template.bind({});
|
|
85
89
|
Default.args = {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
title: 'Exclusive Casino Offers and Free Spins straight to your Inbox',
|
|
94
|
-
description: 'Subscribe below to be the first to get notified of exclusive casino offers, free spins and bonuses - conveniently via email or SMS. We won’t flood your inbox, but just give you the good stuff in the right way!',
|
|
95
|
-
terms: 'I confirm that I am 18+ years old and Irish resident.',
|
|
96
|
-
privacy_text: 'Read our Privacy Policy for more details.'
|
|
90
|
+
page: {},
|
|
91
|
+
title: 'Exclusive Casino Offers and Free Spins straight to your Inbox',
|
|
92
|
+
description:
|
|
93
|
+
'Subscribe below to be the first to get notified of exclusive casino offers, free spins and bonuses - conveniently via email or SMS. We won’t flood your inbox, but just give you the good stuff in the right way!',
|
|
94
|
+
terms: 'I confirm that I am 18+ years old and Irish resident.',
|
|
95
|
+
privacy_text: 'Read our Privacy Policy for more details.',
|
|
97
96
|
};
|
|
@@ -41,7 +41,13 @@ const OperatorSummary = ({
|
|
|
41
41
|
<ConditionalWrapper
|
|
42
42
|
condition={activeOperator}
|
|
43
43
|
wrapper={(item) => (
|
|
44
|
-
<a
|
|
44
|
+
<a
|
|
45
|
+
href={prettyLink}
|
|
46
|
+
title={operatorName}
|
|
47
|
+
target="_blank"
|
|
48
|
+
rel="noreferrer"
|
|
49
|
+
className="operator-summary-gtm"
|
|
50
|
+
>
|
|
45
51
|
{item}
|
|
46
52
|
</a>
|
|
47
53
|
)}
|
|
@@ -53,7 +59,7 @@ const OperatorSummary = ({
|
|
|
53
59
|
className={styles.summary}
|
|
54
60
|
dangerouslySetInnerHTML={{ __html: page.extra_fields.summary }}
|
|
55
61
|
/>
|
|
56
|
-
<OperatorCta operator={operatorData} />
|
|
62
|
+
<OperatorCta operator={operatorData} gtmClass="operator-summary-operator-cta-gtm" />
|
|
57
63
|
{operatorData?.extra_fields?.terms_and_conditions_text_enabled === '1' && (
|
|
58
64
|
<Tnc hasCollapse={false} operator={operatorData} />
|
|
59
65
|
)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
/* eslint-disable camelcase */
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { useContext } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import {
|
|
6
6
|
prettyTracker,
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
getBonus,
|
|
10
10
|
} from 'gatsby-core-theme/src/helpers/getters';
|
|
11
11
|
import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
12
|
+
import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
|
|
12
13
|
import { isMobileDevice } from '../../../helpers/mobile-detect';
|
|
13
14
|
|
|
14
15
|
import styles from './small-welcome-bonus.module.scss';
|
|
@@ -16,14 +17,14 @@ import styles from './small-welcome-bonus.module.scss';
|
|
|
16
17
|
const Index = ({ page }) => {
|
|
17
18
|
const operator = page?.extra_fields?.game_review_summary_operator;
|
|
18
19
|
const { logo_url, status } = operator;
|
|
19
|
-
const
|
|
20
|
+
const { translations } = useContext(Context) || {};
|
|
20
21
|
const isMobile = isMobileDevice();
|
|
21
22
|
const prettyLink = prettyTracker(operator);
|
|
22
|
-
let playNow = translate(
|
|
23
|
+
let playNow = translate(translations, 'play_now', 'Play now');
|
|
23
24
|
const bonus = getBonus('main', operator);
|
|
24
25
|
|
|
25
26
|
if (isMobile) {
|
|
26
|
-
playNow = `> ${translate(
|
|
27
|
+
playNow = `> ${translate(translations, 'play_for_real_at', 'Play for real at')} @ ${
|
|
27
28
|
operator.name
|
|
28
29
|
}`;
|
|
29
30
|
}
|
|
@@ -33,7 +34,13 @@ const Index = ({ page }) => {
|
|
|
33
34
|
<div className={styles.content}>
|
|
34
35
|
<div className={styles.desc}>
|
|
35
36
|
<div className={styles.logo}>
|
|
36
|
-
<a
|
|
37
|
+
<a
|
|
38
|
+
href={prettyLink}
|
|
39
|
+
title={operator.name}
|
|
40
|
+
target="_blank"
|
|
41
|
+
rel="noreferrer"
|
|
42
|
+
className="small-welcome-bonus-gtm logo-cta"
|
|
43
|
+
>
|
|
37
44
|
<LazyImage
|
|
38
45
|
width={120}
|
|
39
46
|
height={50}
|
|
@@ -46,7 +53,13 @@ const Index = ({ page }) => {
|
|
|
46
53
|
</div>
|
|
47
54
|
<div className={styles.ctaButton}>
|
|
48
55
|
{status === 'active' && (
|
|
49
|
-
<a
|
|
56
|
+
<a
|
|
57
|
+
href={prettyLink}
|
|
58
|
+
title={operator.name}
|
|
59
|
+
target="_blank"
|
|
60
|
+
rel="noreferrer"
|
|
61
|
+
className="small-welcome-bonus-gtm"
|
|
62
|
+
>
|
|
50
63
|
{' '}
|
|
51
64
|
{playNow}{' '}
|
|
52
65
|
</a>
|
|
@@ -1,64 +1,60 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
Title,
|
|
5
|
+
Description,
|
|
6
|
+
Primary,
|
|
7
|
+
PRIMARY_STORY,
|
|
8
|
+
ArgsTable,
|
|
8
9
|
} from '@storybook/addon-docs/blocks';
|
|
9
10
|
import SmallWelcomeBonus from '.';
|
|
10
11
|
|
|
11
12
|
export default {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
13
|
+
title: 'Matrix-Theme/Molecules/SmallWelcomeBonus',
|
|
14
|
+
component: SmallWelcomeBonus,
|
|
15
|
+
argTypes: {
|
|
16
|
+
page: {
|
|
17
|
+
name: 'page',
|
|
18
|
+
type: { name: 'object', required: true },
|
|
19
|
+
defaultValue: null,
|
|
20
|
+
description: 'The page object.',
|
|
21
21
|
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
page: () => (
|
|
29
|
-
<>
|
|
30
|
-
<Title />
|
|
31
|
-
<Description />
|
|
32
|
-
<Primary />
|
|
33
|
-
<ArgsTable story={PRIMARY_STORY} />
|
|
34
|
-
</>
|
|
35
|
-
),
|
|
22
|
+
},
|
|
23
|
+
parameters: {
|
|
24
|
+
docs: {
|
|
25
|
+
description: {
|
|
26
|
+
component: 'Small Welcome Bonus component',
|
|
36
27
|
},
|
|
28
|
+
page: () => (
|
|
29
|
+
<>
|
|
30
|
+
<Title />
|
|
31
|
+
<Description />
|
|
32
|
+
<Primary />
|
|
33
|
+
<ArgsTable story={PRIMARY_STORY} />
|
|
34
|
+
</>
|
|
35
|
+
),
|
|
37
36
|
},
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
one_liner:"100 kroner gratis + 200% opptil 2000 kr + 300 gratisspinn"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const Template = (args) => <SmallWelcomeBonus {...args} />;
|
|
41
|
+
|
|
42
|
+
export const Default = Template.bind({});
|
|
43
|
+
Default.args = {
|
|
44
|
+
page: {
|
|
45
|
+
extra_fields: {
|
|
46
|
+
game_review_summary_operator: {
|
|
47
|
+
name: 'Chanz Casino',
|
|
48
|
+
bonus: {
|
|
49
|
+
one_liners: {
|
|
50
|
+
main: {
|
|
51
|
+
one_liner: '100 kroner gratis + 200% opptil 2000 kr + 300 gratisspinn',
|
|
52
|
+
},
|
|
57
53
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
54
|
+
},
|
|
55
|
+
logo_url: 'chanz390pngb3f8bb64f3-original.png',
|
|
56
|
+
status: 'active',
|
|
57
|
+
},
|
|
62
58
|
},
|
|
63
|
-
}
|
|
64
|
-
|
|
59
|
+
},
|
|
60
|
+
};
|