gatsby-matrix-theme 3.1.1 → 3.2.2

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/package.json +2 -2
  3. package/src/components/atoms/cards/comparison-table/comparison-table.module.scss +27 -0
  4. package/src/components/atoms/cards/comparison-table/comparison-table.stories.js +39 -0
  5. package/src/components/atoms/cards/comparison-table/index.js +57 -0
  6. package/src/components/atoms/cards/comparison-table/table/index.js +196 -0
  7. package/src/components/atoms/cards/comparison-table/table/table.module.scss +137 -0
  8. package/src/components/atoms/cards/comparison-table/table/table.test.js +22 -0
  9. package/src/components/atoms/cards/operators-table/index.js +5 -2
  10. package/src/components/atoms/cards/popup-card/index.js +1 -1
  11. package/src/components/molecules/toplist/row/variant-one.test.js +2 -2
  12. package/src/components/organisms/popup/index.js +4 -3
  13. package/src/components/organisms/toplist/index.js +2 -11
  14. package/src/gatsby-core-theme/components/atoms/bonus/bonus.test.js +0 -1
  15. package/src/gatsby-core-theme/components/atoms/bonus/index.js +1 -1
  16. package/src/gatsby-core-theme/components/atoms/spotlights/spotlights.module.scss +78 -109
  17. package/src/gatsby-core-theme/components/molecules/module/index.js +5 -1
  18. package/src/gatsby-core-theme/components/organisms/head/index.js +6 -3
  19. package/src/gatsby-core-theme/styles/utils/variables/_main.scss +10 -1
  20. package/storybook/public/{0.1ef33c54.iframe.bundle.js → 0.4c2881f4.iframe.bundle.js} +1 -1
  21. package/storybook/public/{1.d02d8599.iframe.bundle.js → 1.318fc035.iframe.bundle.js} +1 -1
  22. package/storybook/public/{10.ae38b8e6.iframe.bundle.js → 10.ff8f20a0.iframe.bundle.js} +1 -1
  23. package/storybook/public/{11.86382beb.iframe.bundle.js → 11.a965ed36.iframe.bundle.js} +1 -1
  24. package/storybook/public/{12.b6909189.iframe.bundle.js → 12.f31f86bb.iframe.bundle.js} +1 -1
  25. package/storybook/public/{13.9e6703fb.iframe.bundle.js → 13.c72a573a.iframe.bundle.js} +1 -1
  26. package/storybook/public/{14.b0c67bdf.iframe.bundle.js → 14.454a253c.iframe.bundle.js} +1 -1
  27. package/storybook/public/{15.7bb7d301.iframe.bundle.js → 15.baadf857.iframe.bundle.js} +1 -1
  28. package/storybook/public/{16.d64c7fd7.iframe.bundle.js → 16.9d6c22db.iframe.bundle.js} +1 -1
  29. package/storybook/public/{5.91c30f08.iframe.bundle.js → 5.3751341c.iframe.bundle.js} +3 -3
  30. package/storybook/public/{5.91c30f08.iframe.bundle.js.LICENSE.txt → 5.3751341c.iframe.bundle.js.LICENSE.txt} +0 -0
  31. package/storybook/public/5.3751341c.iframe.bundle.js.map +1 -0
  32. package/storybook/public/{6.002e2a71.iframe.bundle.js → 6.78854fa8.iframe.bundle.js} +1 -1
  33. package/storybook/public/{7.d12dd5b3.iframe.bundle.js → 7.7dfb34cd.iframe.bundle.js} +1 -1
  34. package/storybook/public/{8.c5053ebc.iframe.bundle.js → 8.88be3011.iframe.bundle.js} +1 -1
  35. package/storybook/public/{9.05a986eb.iframe.bundle.js → 9.c2b37d15.iframe.bundle.js} +3 -3
  36. package/storybook/public/{9.05a986eb.iframe.bundle.js.LICENSE.txt → 9.c2b37d15.iframe.bundle.js.LICENSE.txt} +0 -0
  37. package/storybook/public/9.c2b37d15.iframe.bundle.js.map +1 -0
  38. package/storybook/public/iframe.html +1 -1
  39. package/storybook/public/main.30a5eba0.iframe.bundle.js +1 -0
  40. package/storybook/public/{runtime~main.5a919f90.iframe.bundle.js → runtime~main.0dbefcaa.iframe.bundle.js} +1 -1
  41. package/storybook/public/vendors~main.c173cb22.iframe.bundle.js +7 -0
  42. package/storybook/public/{vendors~main.7fa2fd4a.iframe.bundle.js.LICENSE.txt → vendors~main.c173cb22.iframe.bundle.js.LICENSE.txt} +0 -0
  43. package/storybook/public/vendors~main.c173cb22.iframe.bundle.js.map +1 -0
  44. package/src/components/organisms/toplist/comparison-table/comparison-table.module.scss +0 -52
  45. package/src/components/organisms/toplist/comparison-table/index.js +0 -165
  46. package/src/gatsby-core-theme/components/atoms/spotlights/index.js +0 -185
  47. package/storybook/public/5.91c30f08.iframe.bundle.js.map +0 -1
  48. package/storybook/public/9.05a986eb.iframe.bundle.js.map +0 -1
  49. package/storybook/public/main.f2a52f99.iframe.bundle.js +0 -1
  50. package/storybook/public/vendors~main.7fa2fd4a.iframe.bundle.js +0 -7
  51. package/storybook/public/vendors~main.7fa2fd4a.iframe.bundle.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,65 @@
1
+ ## [3.2.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.2.1...v3.2.2) (2022-01-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * comparison table styling ([8ced0c7](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8ced0c7171c3afb95c66b4419ae050942c6c4dda))
7
+
8
+
9
+ * Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/matrix-theme ([1f875a4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/1f875a475402a80d735f22fa27cbbfe2dcde681f))
10
+
11
+ ## [3.2.1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.2.0...v3.2.1) (2022-01-04)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * comparison table configurations ([97d1bd6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/97d1bd6fb267ca43a251b9c748aee14244ee9f7e))
17
+
18
+ # [3.2.0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.1.2...v3.2.0) (2022-01-03)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * add storybook and fix some style issue ([40db75b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/40db75b3d61109ab835053ff8ca9fa52a9625cbc))
24
+ * added scss vars for comparison table and minor fixes ([fe23268](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/fe23268f258709c0f43742261fb152d506e7a48e))
25
+ * fixed name and style also added the deposit method ([b075d1e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b075d1ed2ffcfafc27860a6cdde653866ac24929))
26
+ * second line fix ([ede14f5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ede14f52526d6d09ae415c164d7fa0c0fc13e4f6))
27
+
28
+
29
+ ### Config
30
+
31
+ * updated core version ([bfbdce6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/bfbdce6a196a09cd5ee6befccb3fd36900306a41))
32
+
33
+
34
+ * Merge branch 'STK-2585-Casino-comparison-module' into 'master' ([9376eb2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/9376eb220a8b99a175667ea4f1308c498ae0a2e6))
35
+ * Merge branch 'master' into STK-2585-Casino-comparison-module ([b3c2149](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b3c2149636ae1e46bb96b6843ea2ea7333b90d6c))
36
+
37
+
38
+ ### Features
39
+
40
+ * add the comparison table ([7decb55](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7decb557e543b7307dad0edc78677158bdfb7ced))
41
+
42
+ ## [3.1.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.1.1...v3.1.2) (2021-12-23)
43
+
44
+
45
+ ### Bug Fixes
46
+
47
+ * operator bonus added dividor ([98538a9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/98538a94160ef27a2a4d33334f8534aa6baff32e))
48
+ * fixed parsing metadescription ([f3f7568](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f3f75682e88341ebc90f3f532594e4a816605fc9))
49
+ * new testimonials styling ([7f16177](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7f1617700a339d7e0edd183769b040fb9a419255))
50
+ * removed an useless line ([6320358](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/63203585e3ee6362f1250033b0b41a1180f61ad2))
51
+ * tests ([0d2794f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0d2794feb4f5a93eb08f40c1776330a25aed0850))
52
+
53
+
54
+ ### Config
55
+
56
+ * updated core theme version ([8ead1a7](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8ead1a7c4fec1a4f30acced891b9eaa262d2c104))
57
+
58
+
59
+ * Merge branch 'tm-2629-spotlight-testimonials' into 'master' ([52f20ab](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/52f20abf60df594d49e7eac3c4a5a099e7c2842a))
60
+ * Merge branch 'tm-2610-operator-bonus' into 'master' ([8c80938](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8c80938101df09f25d6458c423f4eaf09e8da5ca))
61
+ * Merge branch 'fix-parse-metadescription' into 'master' ([fbed07c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/fbed07cb84ba1d34a296ebc5cbf059eadfecdd72))
62
+
1
63
  ## [3.1.1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.1.0...v3.1.1) (2021-12-17)
2
64
 
3
65
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "3.1.1",
3
+ "version": "3.2.2",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -31,7 +31,7 @@
31
31
  "cross-env": "^7.0.2",
32
32
  "dotenv": "8.2.0",
33
33
  "gatsby": "^3.3.1",
34
- "gatsby-core-theme": "^2.0.2",
34
+ "gatsby-core-theme": "^2.0.10",
35
35
  "gatsby-image": "^3.3.0",
36
36
  "gatsby-plugin-image": "^1.3.1",
37
37
  "gatsby-plugin-postcss": "^4.3.0",
@@ -0,0 +1,27 @@
1
+ .comparisonTable {
2
+
3
+ .contentTable {
4
+ border-right: 1px solid var(--body-border-color);
5
+ overflow-x: scroll;
6
+ cursor: grabbing;
7
+ &::-webkit-scrollbar {
8
+ height: 5px;
9
+ }
10
+
11
+ /* Track */
12
+ &::-webkit-scrollbar-track {
13
+ background: #f1f1f1;
14
+ }
15
+
16
+ /* Handle */
17
+ &::-webkit-scrollbar-thumb {
18
+ background: rgb(216, 216, 216);
19
+ border-radius: 10px;
20
+ }
21
+
22
+ /* Handle on hover */
23
+ &::-webkit-scrollbar-thumb:hover {
24
+ background: rgb(187, 187, 187);
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ // eslint-disable-next-line import/no-extraneous-dependencies
3
+ import {
4
+ Title,
5
+ Description,
6
+ Primary,
7
+ PRIMARY_STORY,
8
+ ArgsTable,
9
+ } from '@storybook/addon-docs/blocks';
10
+ import { getSampleOperatorCards } from 'gatsby-core-theme/tests/factories/modules/card.factory';
11
+
12
+ import ComparisonTable from '.';
13
+
14
+ export default {
15
+ title: 'Matrix-Theme/Atoms/Comparison Table',
16
+ component: ComparisonTable,
17
+
18
+ parameters: {
19
+ docs: {
20
+ description: {
21
+ component: 'A component that displays a single Popup Card',
22
+ },
23
+ page: () => (
24
+ <>
25
+ <Title />
26
+ <Description />
27
+ <Primary />
28
+ <ArgsTable story={PRIMARY_STORY} />
29
+ </>
30
+ ),
31
+ },
32
+ },
33
+ };
34
+
35
+ const Template = (args) => <ComparisonTable {...args} />;
36
+ export const Default = Template.bind({});
37
+ Default.args = {
38
+ module: getSampleOperatorCards(),
39
+ };
@@ -0,0 +1,57 @@
1
+ import React, { useEffect, useRef } from 'react';
2
+ import PropTypes from 'prop-types';
3
+
4
+ import styles from './comparison-table.module.scss';
5
+ import Table from './table';
6
+
7
+ export default function ComparisonTable({ module }) {
8
+ const ele = useRef('');
9
+
10
+ let pos = { top: 0, left: 0, x: 0, y: 0 };
11
+
12
+ const mouseMoveHandler = (e) => {
13
+ const dx = e.clientX - pos.x;
14
+ ele.current.scrollLeft = pos.left - dx;
15
+ };
16
+
17
+ const mouseLeftHandler = () => {
18
+ ele.current.style.cursor = 'grab';
19
+ ele.current.style.removeProperty('user-select');
20
+
21
+ document.removeEventListener('mousemove', mouseMoveHandler);
22
+ document.removeEventListener('mouseup', mouseLeftHandler);
23
+ };
24
+
25
+ const mouseRightHandler = (e) => {
26
+ ele.current.style.cursor = 'grabbing';
27
+ ele.current.style.userSelect = 'none';
28
+
29
+ pos = {
30
+ left: ele.current.scrollLeft,
31
+ x: e.clientX,
32
+ };
33
+
34
+ document.addEventListener('mousemove', mouseMoveHandler);
35
+ document.addEventListener('mouseup', mouseLeftHandler);
36
+ };
37
+
38
+ useEffect(() => {
39
+ ele.current.style.cursor = 'grab';
40
+ ele.current.addEventListener('mousedown', mouseRightHandler);
41
+ // eslint-disable-next-line react-hooks/exhaustive-deps
42
+ }, []);
43
+
44
+ return (
45
+ <div className={styles.comparisonTable}>
46
+ <div ref={ele} className={styles.contentTable}>
47
+ <Table items={module?.items} />
48
+ </div>
49
+ </div>
50
+ );
51
+ }
52
+
53
+ ComparisonTable.propTypes = {
54
+ module: PropTypes.shape({
55
+ items: PropTypes.shape({}),
56
+ }),
57
+ };
@@ -0,0 +1,196 @@
1
+ import React, { useContext } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { AiOutlineCheckCircle } from 'react-icons/ai';
4
+ import { imagePrettyUrl, translate } from 'gatsby-core-theme/src/helpers/getters';
5
+ import LazyImg from 'gatsby-core-theme/src/hooks/lazy-image';
6
+ import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta';
7
+ import StarRating from 'gatsby-core-theme/src/components/molecules/star-rating';
8
+ import Link from 'gatsby-core-theme/src/hooks/link';
9
+ import Bonus from 'gatsby-core-theme/src/components/atoms/bonus';
10
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
11
+
12
+ import styles from './table.module.scss';
13
+
14
+ export default function ComparisonTable({ items }) {
15
+ const { translations } = useContext(Context) || {};
16
+
17
+ const tabelInfo = [
18
+ {
19
+ defaultValue: 'Casino name',
20
+ key: 'casino_name',
21
+ },
22
+ {
23
+ defaultValue: 'Rating',
24
+ key: 'rating',
25
+ },
26
+ {
27
+ defaultValue: 'Bonus',
28
+ key: 'bonus',
29
+ },
30
+ {
31
+ defaultValue: 'Top Features',
32
+ key: 'top_features',
33
+ },
34
+ {
35
+ defaultValue: 'Payment Methods',
36
+ key: 'payment_methods',
37
+ },
38
+ {
39
+ defaultValue: 'Banking',
40
+ key: 'banking',
41
+ },
42
+ {
43
+ defaultValue: 'Currencies',
44
+ key: 'currencies',
45
+ },
46
+ {
47
+ defaultValue: 'Licenses',
48
+ key: 'licenses',
49
+ },
50
+ ];
51
+
52
+ const cell = (heading, item, index) => {
53
+ switch (heading) {
54
+ case 'casino_name':
55
+ return (
56
+ <td key={index} className={styles.casinoName}>
57
+ <LazyImg
58
+ src={imagePrettyUrl(item?.relation?.logo_url)}
59
+ height={89}
60
+ width={89}
61
+ alt={item.title}
62
+ />
63
+ <div>
64
+ <span>{item.title}</span>
65
+ <OperatorCta
66
+ tracker="main"
67
+ operator={item?.relation}
68
+ playText={translate(translations, 'play_now', 'Play Now')}
69
+ gtmClass="operator-card-gtm btn-cta"
70
+ />
71
+ </div>
72
+ </td>
73
+ );
74
+ case 'rating':
75
+ return (
76
+ <td key={index} className={styles.raiting}>
77
+ <StarRating numOfStars={5} rating={item?.relation?.rating} />
78
+ <Link to={item.path}> {translate(translations, 'review', 'Read Review')} </Link>
79
+ </td>
80
+ );
81
+ case 'bonus':
82
+ return (
83
+ <td key={index} className={styles.bonus}>
84
+ <Bonus tracker="main" item={item?.relation} />
85
+ </td>
86
+ );
87
+ case 'top_features':
88
+ return (
89
+ <td key={index} className={styles.topFeatures}>
90
+ {item?.relation?.selling_points &&
91
+ item?.relation?.selling_points.map((sellingPoint) => (
92
+ <span key={sellingPoint}>
93
+ <AiOutlineCheckCircle size={27} /> {sellingPoint}
94
+ </span>
95
+ ))}
96
+ </td>
97
+ );
98
+ case 'payment_methods':
99
+ return (
100
+ <td key={index} className={styles.paymentMethods}>
101
+ {item?.relation?.bonus?.deposit_methods &&
102
+ item?.relation?.bonus?.deposit_methods.slice(0, 5).map((deposit) => (
103
+ <span key={deposit.name}>
104
+ <LazyImg
105
+ src={imagePrettyUrl(deposit?.logo_filename)}
106
+ width={72}
107
+ height={72}
108
+ alt={deposit.name}
109
+ />
110
+ </span>
111
+ ))}
112
+ {item?.relation?.bonus?.deposit_methods?.length > 5 && (
113
+ <span>+{item?.relation?.bonus?.deposit_methods.length - 5}</span>
114
+ )}
115
+ </td>
116
+ );
117
+ case 'banking':
118
+ return (
119
+ <td key={index} className={styles.banking}>
120
+ <p>
121
+ {translate(translations, 'min_deposit', 'Min Deposit')}
122
+ <span>{item?.relation?.bonus?.min_deposit}</span>
123
+ </p>
124
+ <p>
125
+ {translate(translations, 'max_withdrawal', 'Max Withdrawal')}
126
+ <span>{item?.relation?.bonus?.max_withdrawal}</span>
127
+ </p>
128
+ <p>
129
+ {translate(translations, 'currency_support', 'Currency Support')}
130
+ <span>
131
+ {item?.relation?.bonus?.currencies &&
132
+ item?.relation?.bonus?.currencies
133
+ .slice(0, 3)
134
+ .map((currencies) => currencies.iso_code)}
135
+ </span>
136
+ </p>
137
+ </td>
138
+ );
139
+ case 'currencies':
140
+ return (
141
+ <td key={index} className={styles.currencies}>
142
+ {item?.relation?.bonus?.currencies &&
143
+ item?.relation?.bonus?.currencies.map((currencies) => (
144
+ // eslint-disable-next-line react/no-array-index-key
145
+ <span key={currencies.iso_code}>{currencies.iso_code} </span>
146
+ ))}
147
+ </td>
148
+ );
149
+ case 'licenses':
150
+ return (
151
+ <td key={index} className={styles.licenses}>
152
+ {item?.relation?.bonus?.license_objects &&
153
+ item?.relation?.bonus?.license_objects.map((license) => (
154
+ <LazyImg
155
+ src={imagePrettyUrl(license?.logo_filename)}
156
+ height={32}
157
+ alt={license.name}
158
+ />
159
+ ))}
160
+ </td>
161
+ );
162
+ default:
163
+ return '';
164
+ }
165
+ };
166
+
167
+ const table = () => {
168
+ const row = [];
169
+ tabelInfo.forEach((heading) => {
170
+ const cells = [];
171
+
172
+ items.forEach((item, index) => {
173
+ cells.push(cell(heading.key, item, `${heading}-${index}`));
174
+ });
175
+
176
+ row.push(
177
+ <tr>
178
+ <th>{translate(translations, heading.key, heading.defaultValue)}</th>
179
+ {cells}
180
+ </tr>
181
+ );
182
+ });
183
+
184
+ return (
185
+ <table className={styles.table}>
186
+ <tbody>{row}</tbody>
187
+ </table>
188
+ );
189
+ };
190
+
191
+ return table();
192
+ }
193
+
194
+ ComparisonTable.propTypes = {
195
+ items: PropTypes.arrayOf(PropTypes.object),
196
+ };
@@ -0,0 +1,137 @@
1
+ .table {
2
+ cursor: grabbing;
3
+ tr {
4
+ grid-template-columns: 15.2rem 27rem;
5
+ grid-auto-columns: 27rem;
6
+ grid-auto-flow: column;
7
+ display: grid;
8
+
9
+ &:first-child {
10
+ th {
11
+ border-top-left-radius: 0.8rem;
12
+ }
13
+ }
14
+
15
+ &:last-child {
16
+ th {
17
+ border-bottom-left-radius: 0.8rem;
18
+ border-bottom: 1px solid var(--comparison-header-border-color);
19
+ }
20
+ }
21
+
22
+ th {
23
+ @include flex-align(center, center);
24
+ background-color: var(--comparison-header-background-color);
25
+ border: 1px solid var(--comparison-header-border-color);
26
+ border-bottom: none;
27
+ box-sizing: border-box;
28
+ color: var(--comparison-header-text-color);
29
+ text-transform: var(--comparison-header-text-transform);
30
+ font-size: 1.4rem;
31
+
32
+ @include min(laptop) {
33
+ position: sticky;
34
+ z-index: 1;
35
+ left: 0;
36
+ }
37
+ }
38
+ td {
39
+ border: 1px solid var(--comparison-body-border-color);
40
+ background-color: var(--comparison-body-background-color);
41
+ box-sizing: border-box;
42
+ padding: 1.6rem;
43
+ }
44
+ .casinoName {
45
+ @include flex-direction(row);
46
+ @include flex-align(center, space-between);
47
+ padding: 1.6rem;
48
+ img {
49
+ border: 1px solid var(--color-9);
50
+ box-sizing: border-box;
51
+ margin-right: 1.6rem;
52
+ }
53
+ span {
54
+ font-weight: bold;
55
+ font-size: 18px;
56
+ line-height: 25px;
57
+ }
58
+ }
59
+
60
+ .bonus {
61
+ div:first-child {
62
+ font-size: 1.6rem;
63
+ font-weight: bold;
64
+ }
65
+ div:nth-child(2) {
66
+ font-size: 1.4rem;
67
+ font-weight: bold;
68
+ }
69
+ }
70
+
71
+ .raiting {
72
+ @include flex-align(center, space-between);
73
+
74
+ a {
75
+ font-weight: bold;
76
+ font-size: 1.6rem;
77
+ }
78
+ }
79
+ .topFeatures {
80
+ @include flex-direction(column);
81
+ @include flex-align(flex-start, center);
82
+ span {
83
+ @include flex-direction(row);
84
+ @include flex-align(center, center);
85
+ margin-bottom: 0.8rem;
86
+ svg {
87
+ color: var(--comparison-top-features-icon-color);
88
+ margin-right: 0.93rem;
89
+ }
90
+ }
91
+ }
92
+ .banking {
93
+ @include flex-direction(column);
94
+ @include flex-align(center, center);
95
+ p {
96
+ width: 100%;
97
+ @include flex-align(center, space-between);
98
+ font-weight: 500;
99
+ font-size: 1.4rem;
100
+ line-height: 2.4rem;
101
+ margin-bottom: 1rem;
102
+ span {
103
+ font-weight: bold;
104
+ }
105
+ }
106
+ }
107
+ .currencies {
108
+ span {
109
+ margin-left: 0.4rem;
110
+ background: var(--comparison-currencies-background-color);
111
+ color: var(--comparison-currencies-text-color);
112
+ border-radius: 2px;
113
+ padding: 0.3rem 0.79rem;
114
+ font-weight: bold;
115
+ font-size: 12px;
116
+ line-height: 18px;
117
+ }
118
+ }
119
+ .paymentMethods {
120
+ display: grid;
121
+ grid-template-columns: repeat(3, 1fr);
122
+ span {
123
+ @include flex-direction(row);
124
+ @include flex-align(center, center);
125
+ font-weight: bold;
126
+ font-size: 14px;
127
+ line-height: 18px;
128
+ }
129
+ }
130
+
131
+ .licenses {
132
+ img {
133
+ max-height: 3.2rem;
134
+ }
135
+ }
136
+ }
137
+ }
@@ -0,0 +1,22 @@
1
+ /* eslint-disable array-callback-return */
2
+ import React from 'react';
3
+ import { render, cleanup } from '@testing-library/react';
4
+ import '@testing-library/jest-dom/extend-expect';
5
+ import { getSampleOperatorCards } from 'gatsby-core-theme/tests/factories/modules/card.factory';
6
+
7
+ import ComparisonTable from '.';
8
+
9
+ const module = getSampleOperatorCards();
10
+
11
+ describe('Comparison table test component', () => {
12
+ test('render', () => {
13
+ const { getByText } = render(<ComparisonTable items={module.items} />);
14
+
15
+ module.items.map((item) => {
16
+ expect(getByText(item.title));
17
+ });
18
+ });
19
+ });
20
+ afterEach(() => {
21
+ cleanup();
22
+ });
@@ -14,8 +14,11 @@ const CasinosTable = ({ module }) => {
14
14
  const [firstLine, secondLine] = one_liner.split('+');
15
15
  return (
16
16
  <>
17
- <span className={styles.firstLine}>{firstLine}<br /></span>
18
- <span className={styles.secondLine}>{`+${secondLine}`}</span>
17
+ <span className={styles.firstLine}>
18
+ {firstLine}
19
+ <br />
20
+ </span>
21
+ {secondLine && <span className={styles.secondLine}>{`+${secondLine}`}</span>}
19
22
  </>
20
23
  );
21
24
  };
@@ -23,7 +23,7 @@ const PopupCard = ({ item, tracker }) => {
23
23
  </div>
24
24
  <div className={styles.textContainer}>
25
25
  <p className={styles.primaryText}>{one}</p>
26
- <p className={styles.secondaryText}>{second}</p>
26
+ <p className={styles.secondaryText}>{`+${second}`}</p>
27
27
  </div>
28
28
  </div>
29
29
  <div className={styles.buttonContainer}>
@@ -17,7 +17,7 @@ describe('toplist row component', () => {
17
17
 
18
18
  // Bonus
19
19
  expect(getByText('€100 welcome bonus')).toBeTruthy();
20
- expect(getByText('150 free spins')).toBeTruthy();
20
+ expect(getByText('+150 free spins')).toBeTruthy();
21
21
 
22
22
  // Rating & Logo
23
23
  // expect(container.querySelector('img')).toBeFalsy();
@@ -47,7 +47,7 @@ describe('toplist row component', () => {
47
47
 
48
48
  // Bonus
49
49
  expect(getByText('€100 welcome bonus')).toBeTruthy();
50
- expect(getByText('150 free spins')).toBeTruthy();
50
+ expect(getByText('+150 free spins')).toBeTruthy();
51
51
 
52
52
  // Rating & Logo
53
53
  // expect(container.querySelector('img')).toBeFalsy();
@@ -99,8 +99,9 @@ const Popup = ({ module, isStorybook = false }) => {
99
99
  <MdClose />
100
100
  </button>
101
101
  </div>
102
- {shownItems?.map((item) => (
103
- <PopupCard item={item} tracker={tracker} />
102
+ {shownItems?.map((item, index) => (
103
+ // eslint-disable-next-line react/no-array-index-key
104
+ <PopupCard key={index} item={item} tracker={tracker} />
104
105
  ))}
105
106
  </div>
106
107
  </div>
@@ -111,7 +112,7 @@ const Popup = ({ module, isStorybook = false }) => {
111
112
 
112
113
  Popup.propTypes = {
113
114
  module: PropTypes.shape({
114
- items: PropTypes.arrayOf({}),
115
+ items: PropTypes.arrayOf(PropTypes.object),
115
116
  style: PropTypes.string,
116
117
  }).isRequired,
117
118
  isStorybook: PropTypes.bool,
@@ -1,25 +1,16 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  // eslint-disable-next-line import/no-extraneous-dependencies
4
- import loadable from '@loadable/component';
5
4
  import keygen from '~helpers/keygen';
6
5
  import List from './list';
7
6
  import Tabs from '~hooks/tabs';
8
7
  import Row from '../../molecules/toplist/row/variant-one';
9
8
 
9
+ // eslint-disable-next-line no-unused-vars
10
10
  const TopList = ({ module, toplistHeading, CustomRow, page }) => {
11
11
  const template = page?.template;
12
- const ComparisonTable =
13
- module?.style === 'comparison_table' ? loadable(() => import('./comparison-table')) : null;
14
12
 
15
- return ComparisonTable ? (
16
- <ComparisonTable
17
- module={module}
18
- toplistHeading={toplistHeading}
19
- CustomRow={CustomRow}
20
- page={page}
21
- />
22
- ) : (
13
+ return (
23
14
  <Tabs title={module.title} module={module} tabsAlign="right" gtmClass="toplist-tabs-menu-gtm">
24
15
  {module.items.map((toplist) => (
25
16
  <div label={toplist.title} key={keygen()}>
@@ -10,7 +10,6 @@ describe('Bonus Component', () => {
10
10
  const item = getToplistItem();
11
11
  const { getByText } = render(<Bonus item={item} tracker="main" />);
12
12
  expect(getByText('€100 welcome bonus')).toBeTruthy();
13
- expect(getByText('150 free spins')).toBeTruthy();
14
13
  });
15
14
  test('without oneLiner', () => {
16
15
  const { container } = render(
@@ -22,7 +22,7 @@ export default function Bonus({ item, tracker }) {
22
22
  return (
23
23
  <div className={styles.bonus}>
24
24
  {!isInoperative && <div className={styles.title}>{mainLine && mainLine}</div>}
25
- {!isInoperative && <div className={styles.desc}>{secondLine && secondLine}</div>}
25
+ {!isInoperative && <div className={styles.desc}>{secondLine && `+${secondLine}`}</div>}
26
26
  </div>
27
27
  );
28
28
  }