gatsby-matrix-theme 3.1.2 → 3.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/CHANGELOG.md +24 -0
- package/package.json +2 -2
- package/src/components/atoms/cards/comparison-table/comparison-table.module.scss +27 -0
- package/src/components/atoms/cards/comparison-table/comparison-table.stories.js +39 -0
- package/src/components/atoms/cards/comparison-table/index.js +57 -0
- package/src/components/atoms/cards/comparison-table/table/index.js +196 -0
- package/src/components/atoms/cards/comparison-table/table/table.module.scss +114 -0
- package/src/components/atoms/cards/comparison-table/table/table.test.js +22 -0
- package/src/components/atoms/cards/operators-table/index.js +5 -2
- package/src/components/organisms/toplist/index.js +2 -11
- package/src/gatsby-core-theme/components/molecules/module/index.js +4 -0
- package/src/gatsby-core-theme/styles/utils/variables/_main.scss +6 -0
- package/storybook/public/{0.1ef33c54.iframe.bundle.js → 0.1be55b0d.iframe.bundle.js} +1 -1
- package/storybook/public/{1.d02d8599.iframe.bundle.js → 1.318fc035.iframe.bundle.js} +1 -1
- package/storybook/public/{10.ae38b8e6.iframe.bundle.js → 10.ff8f20a0.iframe.bundle.js} +1 -1
- package/storybook/public/{11.86382beb.iframe.bundle.js → 11.a965ed36.iframe.bundle.js} +1 -1
- package/storybook/public/{12.b6909189.iframe.bundle.js → 12.f31f86bb.iframe.bundle.js} +1 -1
- package/storybook/public/{13.9e6703fb.iframe.bundle.js → 13.c72a573a.iframe.bundle.js} +1 -1
- package/storybook/public/{14.b0c67bdf.iframe.bundle.js → 14.454a253c.iframe.bundle.js} +1 -1
- package/storybook/public/{15.7bb7d301.iframe.bundle.js → 15.baadf857.iframe.bundle.js} +1 -1
- package/storybook/public/{16.d64c7fd7.iframe.bundle.js → 16.9d6c22db.iframe.bundle.js} +1 -1
- package/storybook/public/{5.91c30f08.iframe.bundle.js → 5.3751341c.iframe.bundle.js} +3 -3
- package/storybook/public/{5.91c30f08.iframe.bundle.js.LICENSE.txt → 5.3751341c.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/5.3751341c.iframe.bundle.js.map +1 -0
- package/storybook/public/{6.002e2a71.iframe.bundle.js → 6.9025e607.iframe.bundle.js} +1 -1
- package/storybook/public/{7.d12dd5b3.iframe.bundle.js → 7.d2ff48a2.iframe.bundle.js} +1 -1
- package/storybook/public/{8.c5053ebc.iframe.bundle.js → 8.88be3011.iframe.bundle.js} +1 -1
- package/storybook/public/{9.05a986eb.iframe.bundle.js → 9.a1a96ae4.iframe.bundle.js} +3 -3
- package/storybook/public/{9.05a986eb.iframe.bundle.js.LICENSE.txt → 9.a1a96ae4.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/9.a1a96ae4.iframe.bundle.js.map +1 -0
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.e39e4b91.iframe.bundle.js +1 -0
- package/storybook/public/{runtime~main.5a919f90.iframe.bundle.js → runtime~main.44164ddf.iframe.bundle.js} +1 -1
- package/storybook/public/vendors~main.dc143446.iframe.bundle.js +7 -0
- package/storybook/public/{vendors~main.145aeafa.iframe.bundle.js.LICENSE.txt → vendors~main.dc143446.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/vendors~main.dc143446.iframe.bundle.js.map +1 -0
- package/src/components/organisms/toplist/comparison-table/comparison-table.module.scss +0 -52
- package/src/components/organisms/toplist/comparison-table/index.js +0 -165
- package/storybook/public/5.91c30f08.iframe.bundle.js.map +0 -1
- package/storybook/public/9.05a986eb.iframe.bundle.js.map +0 -1
- package/storybook/public/main.c8da7880.iframe.bundle.js +0 -1
- package/storybook/public/vendors~main.145aeafa.iframe.bundle.js +0 -7
- package/storybook/public/vendors~main.145aeafa.iframe.bundle.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
# [3.2.0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.1.2...v3.2.0) (2022-01-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add storybook and fix some style issue ([40db75b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/40db75b3d61109ab835053ff8ca9fa52a9625cbc))
|
|
7
|
+
* added scss vars for comparison table and minor fixes ([fe23268](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/fe23268f258709c0f43742261fb152d506e7a48e))
|
|
8
|
+
* fixed name and style also added the deposit method ([b075d1e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b075d1ed2ffcfafc27860a6cdde653866ac24929))
|
|
9
|
+
* second line fix ([ede14f5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ede14f52526d6d09ae415c164d7fa0c0fc13e4f6))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Config
|
|
13
|
+
|
|
14
|
+
* updated core version ([bfbdce6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/bfbdce6a196a09cd5ee6befccb3fd36900306a41))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
* Merge branch 'STK-2585-Casino-comparison-module' into 'master' ([9376eb2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/9376eb220a8b99a175667ea4f1308c498ae0a2e6))
|
|
18
|
+
* Merge branch 'master' into STK-2585-Casino-comparison-module ([b3c2149](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b3c2149636ae1e46bb96b6843ea2ea7333b90d6c))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* add the comparison table ([7decb55](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7decb557e543b7307dad0edc78677158bdfb7ced))
|
|
24
|
+
|
|
1
25
|
## [3.1.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.1.1...v3.1.2) (2021-12-23)
|
|
2
26
|
|
|
3
27
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
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.
|
|
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}>
|
|
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} color="#FF893F" /> {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>
|
|
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,114 @@
|
|
|
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
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
th {
|
|
22
|
+
@include flex-align(center, center);
|
|
23
|
+
background-color: var(--header-background-color);
|
|
24
|
+
border: 1px solid var(--header-border-color);
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
color: var(--header-text-color);
|
|
27
|
+
|
|
28
|
+
@include min(laptop) {
|
|
29
|
+
position: sticky;
|
|
30
|
+
z-index: 1;
|
|
31
|
+
left: 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
td {
|
|
35
|
+
border: 1px solid var(--body-border-color);
|
|
36
|
+
background-color: var(--body-background-color);
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
padding: 1.6rem;
|
|
39
|
+
}
|
|
40
|
+
.casinoName {
|
|
41
|
+
@include flex-direction(row);
|
|
42
|
+
@include flex-align(center, center);
|
|
43
|
+
padding: 1.6rem;
|
|
44
|
+
img {
|
|
45
|
+
border: 1px solid var(--color-9);
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
margin-right: 1.6rem;
|
|
48
|
+
}
|
|
49
|
+
span {
|
|
50
|
+
font-weight: bold;
|
|
51
|
+
font-size: 18px;
|
|
52
|
+
line-height: 25px;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
.raiting {
|
|
56
|
+
@include flex-align(center, space-between);
|
|
57
|
+
}
|
|
58
|
+
.topFeatures {
|
|
59
|
+
@include flex-direction(column);
|
|
60
|
+
@include flex-align(flex-start, center);
|
|
61
|
+
span {
|
|
62
|
+
@include flex-direction(row);
|
|
63
|
+
@include flex-align(center, center);
|
|
64
|
+
margin-bottom: 0.8rem;
|
|
65
|
+
svg {
|
|
66
|
+
margin-right: 0.93rem;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
.banking {
|
|
71
|
+
@include flex-direction(column);
|
|
72
|
+
@include flex-align(center, center);
|
|
73
|
+
p {
|
|
74
|
+
width: 100%;
|
|
75
|
+
@include flex-align(center, space-between);
|
|
76
|
+
font-weight: 500;
|
|
77
|
+
font-size: 16px;
|
|
78
|
+
line-height: 24px;
|
|
79
|
+
margin-bottom: 1rem;
|
|
80
|
+
span {
|
|
81
|
+
font-weight: bold;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
.currencies {
|
|
86
|
+
span {
|
|
87
|
+
margin-left: 0.4rem;
|
|
88
|
+
background: var(--color-9);
|
|
89
|
+
border-radius: 2px;
|
|
90
|
+
padding: 0.3rem 0.79rem;
|
|
91
|
+
font-weight: bold;
|
|
92
|
+
font-size: 12px;
|
|
93
|
+
line-height: 18px;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
.paymentMethods {
|
|
97
|
+
display: grid;
|
|
98
|
+
grid-template-columns: repeat(3, 1fr);
|
|
99
|
+
span {
|
|
100
|
+
@include flex-direction(row);
|
|
101
|
+
@include flex-align(center, center);
|
|
102
|
+
font-weight: bold;
|
|
103
|
+
font-size: 14px;
|
|
104
|
+
line-height: 18px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.licenses {
|
|
109
|
+
img {
|
|
110
|
+
max-height: 3.2rem;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -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}>
|
|
18
|
-
|
|
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
|
};
|
|
@@ -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
|
|
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()}>
|
|
@@ -27,6 +27,10 @@ const Modules = ({ module, page, pageContext }) => {
|
|
|
27
27
|
if (moduleItem.style === 'stack_table' && moduleItem.cards_page_type === 'operator') {
|
|
28
28
|
return loadable(() => import('../../../../components/atoms/cards/operators-table'));
|
|
29
29
|
}
|
|
30
|
+
if (moduleItem.style === 'comparison_table' && moduleItem.cards_page_type === 'operator') {
|
|
31
|
+
return loadable(() => import('../../../../components/atoms/cards/comparison-table'));
|
|
32
|
+
}
|
|
33
|
+
|
|
30
34
|
return loadable(() => import('../../organisms/cards'));
|
|
31
35
|
case 'pros_and_cons':
|
|
32
36
|
return loadable(() => import('gatsby-core-theme/src/components/molecules/pros-cons'));
|
|
@@ -73,5 +73,11 @@
|
|
|
73
73
|
--page-number-color: #fff;
|
|
74
74
|
--sitemap-background-color: #fff;
|
|
75
75
|
|
|
76
|
+
// Comparison Table
|
|
77
|
+
--header-border-color: #D0C0AD;
|
|
78
|
+
--header-text-color: #171F49;
|
|
79
|
+
--header-background-color: #F9F6F3;
|
|
80
|
+
--body-border-color: #F3F2F2;
|
|
81
|
+
--body-background-color: #ffffff;
|
|
76
82
|
|
|
77
83
|
}
|