gatsby-matrix-theme 17.1.3 → 18.0.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/preview.js +9 -1
- package/CHANGELOG.md +46 -0
- package/package.json +2 -2
- package/src/components/atoms/cards/base-card/base-card.module.scss +2 -1
- package/src/components/atoms/cards/operator-card/template-four/index.js +182 -0
- package/src/components/atoms/cards/operator-card/template-four/template-four.module.scss +262 -0
- package/src/components/atoms/cards/operator-card/template-four/template-four.stories.js +87 -0
- package/src/components/atoms/cards/operator-card/template-four/template-four.test.js +150 -0
- package/src/components/atoms/cards/operator-card/template-one/index.js +233 -0
- package/src/components/atoms/cards/operator-card/template-one/template-one.module.scss +303 -0
- package/src/components/atoms/cards/operator-card/template-one/template-one.stories.js +129 -0
- package/src/components/atoms/cards/operator-card/template-one/template-one.test.js +193 -0
- package/src/components/atoms/cards/operator-card/template-three/index.js +179 -0
- package/src/components/atoms/cards/operator-card/template-three/template-three.module.scss +211 -0
- package/src/components/atoms/cards/operator-card/template-three/template-three.stories.js +91 -0
- package/src/components/atoms/cards/operator-card/template-three/template-three.test.js +138 -0
- package/src/components/atoms/cards/operator-card/template-two/index.js +221 -0
- package/src/components/atoms/cards/operator-card/template-two/template-two.module.scss +298 -0
- package/src/components/atoms/cards/operator-card/template-two/template-two.stories.js +116 -0
- package/src/components/atoms/cards/operator-card/template-two/template-two.test.js +143 -0
- package/src/components/atoms/cards/operator-card/variables/index.js +13 -0
- package/src/components/atoms/cards/operator-card/variables/variable.module.scss +0 -0
- package/src/components/molecules/header/variants/default/template-two/template-two.test.js +1 -1
- package/src/components/molecules/header/variants/payment/template-one-three/template-one-three.module.scss +0 -1
- package/src/components/molecules/operator-summary/operator-summary.test.js +1 -1
- package/src/constants/ratings-constant.js +26 -0
- package/src/gatsby-core-theme/components/organisms/cards/cards.stories.js +1 -1
- package/src/gatsby-core-theme/components/organisms/cards/index.js +37 -18
- package/src/gatsby-core-theme/components/pages/body/index.js +1 -1
- package/src/gatsby-core-theme/styles/utils/variables/_colors.scss +15 -0
- package/src/gatsby-core-theme/styles/utils/variables/_main.scss +6 -0
- package/storybook/public/233.33990971.iframe.bundle.js +1 -0
- package/storybook/public/{870.4fcc5488.iframe.bundle.js → 609.a72651b8.iframe.bundle.js} +4 -4
- package/storybook/public/{870.4fcc5488.iframe.bundle.js.map → 609.a72651b8.iframe.bundle.js.map} +1 -1
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.77d0b136.iframe.bundle.js +1 -0
- package/storybook/public/runtime~main.e5790e84.iframe.bundle.js +1 -0
- package/src/components/atoms/cards/operator-card/index.js +0 -148
- package/src/components/atoms/cards/operator-card/operator-card.module.scss +0 -99
- package/storybook/public/main.c915a422.iframe.bundle.js +0 -1
- package/storybook/public/runtime~main.514de402.iframe.bundle.js +0 -1
- /package/storybook/public/{870.4fcc5488.iframe.bundle.js.LICENSE.txt → 609.a72651b8.iframe.bundle.js.LICENSE.txt} +0 -0
package/.storybook/preview.js
CHANGED
|
@@ -41,7 +41,15 @@ export const parameters = {
|
|
|
41
41
|
['Template One', 'Template Two', 'Template Three'],
|
|
42
42
|
],
|
|
43
43
|
'Modules',
|
|
44
|
-
[
|
|
44
|
+
[
|
|
45
|
+
'Cards',
|
|
46
|
+
[
|
|
47
|
+
'Operator',
|
|
48
|
+
['Template One', 'Template Two', 'Template Three', 'Template Four'],
|
|
49
|
+
'Payments',
|
|
50
|
+
['Template One', 'Template Two', 'Template Three'],
|
|
51
|
+
],
|
|
52
|
+
],
|
|
45
53
|
'Atoms',
|
|
46
54
|
'Molecules',
|
|
47
55
|
'Organisms',
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,49 @@
|
|
|
1
|
+
# [18.0.0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v17.1.3...v18.0.0) (2023-04-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Code Refactoring
|
|
5
|
+
|
|
6
|
+
* changes to casino text to align with nsa ([6cbb598](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6cbb598fd65ac43e1b377555964eaf4ce1e4dba7))
|
|
7
|
+
* changes to ratings showLabel ([c7d6321](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c7d6321c96f743ce319c751057d8ccade79ed9d5))
|
|
8
|
+
* changes to template cards to align with site level ([801a588](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/801a5886bb33db9c44be4e1db1aa9eaab69061c9))
|
|
9
|
+
* changes to templates cards for sites ([878306f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/878306f560b36cb32849a19472513c592b92528f))
|
|
10
|
+
* changes to tnc ([01bbef0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/01bbef0d2a61d79cffa57b08e7cd3a0185646f18))
|
|
11
|
+
* changes to variable component ([5521c9e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5521c9e05d3365552932a33279bc123abbe84736))
|
|
12
|
+
* code review changes ([a562787](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a5627876ac0162f80d832d5235bdb2d1e0c6c941))
|
|
13
|
+
* extra component for additional details ([cd50bf2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/cd50bf2fa5555b39598b829818e52fcc384cf6e1))
|
|
14
|
+
* initial commit for operator cards ([a76c50b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a76c50b2b8b11cf4e1879d28ab4fa1f3057ee0d7))
|
|
15
|
+
* minor css ([de689e0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/de689e0be4fe0d42df7b641be8244d10e9ffad2c))
|
|
16
|
+
* operator cards templates ([907d72b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/907d72b237acaf96a968fcf6f340bde8c05ca34a))
|
|
17
|
+
* remove duplicate translation ([58ecabe](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/58ecabec689f02126412c45b1a98265c9e612b1e))
|
|
18
|
+
* storybook changes to operator cards ([51cdadd](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/51cdadddd49d5cea0ec1d0c0066e1c00774a1b03))
|
|
19
|
+
* template structure for operator cards ([7c6a48a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7c6a48a8c5982eba45963b93ad5406ccb0fcfdbf))
|
|
20
|
+
* template two styles ([667e41a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/667e41a1d1e34721521dba8e9b192790692e7548))
|
|
21
|
+
* typo fix ([f39c624](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f39c624fa976e8bdb12b89037799a65f90b487c8))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Config
|
|
25
|
+
|
|
26
|
+
* update to latest core theme ([f5a7eef](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f5a7eef8048e4d403a995e1c1a60340ca2a0bc5d))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
* Merge branch 'tm-3309-operator-cards' into 'master' ([4944c65](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/4944c65a44b55aa0b0bf89c893a15c90e6b2a564))
|
|
30
|
+
* Merge branch 'master' into tm-3309-operator-cards ([e595093](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e595093307ea164c583597eb571c4f2b3881a7fe))
|
|
31
|
+
* Merge branch 'master' into tm-3309-operator-cards ([a45a12e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a45a12e497a7682060637ba3c30ae80c7d712be9))
|
|
32
|
+
* Merge branch 'master' into tm-3309-operator-cards ([bc506d0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/bc506d07f6aac0fa174418b351b92932030d716a))
|
|
33
|
+
* Merge branch 'master' into tm-3309-operator-cards ([1f93124](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/1f93124ecc24e9b3c9bbc8edd2489c6a6c637609))
|
|
34
|
+
* Merge branch 'master' into tm-3309-operator-cards ([220aafb](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/220aafbf3ae097092c7947cbee661ade83d315f0))
|
|
35
|
+
* Merge branch 'master' into tm-3309-operator-cards ([a3b6793](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a3b6793644d49958d3cc540cbda821aa4039add1))
|
|
36
|
+
* Merge branch 'master' into tm-3309-operator-cards ([1be999f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/1be999fb992488416aa96bab3e1b4efbe2038a3b))
|
|
37
|
+
* Merge branch 'master' into tm-3309-operator-cards ([e911a0b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e911a0b2dc1ac957c2d23e23f7df77b440bbf4fd))
|
|
38
|
+
* Merge branch 'master' into tm-3309-operator-cards ([7583ef9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7583ef90ef11a6a9539c5cf25fe17205b0e2333f))
|
|
39
|
+
* Merge branch 'master' into tm-3309-operator-cards ([a2fab7e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a2fab7e311fa1a40d168014fd28411bf913b3b59))
|
|
40
|
+
* Merge branch 'master' into tm-3309-operator-cards ([2b1f007](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2b1f00789ac1b93c5ca952f065254f26f24f3e50))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Tests
|
|
44
|
+
|
|
45
|
+
* test scripts for operator cards ([f3a4c79](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f3a4c79d83c501ad69d6e4e6fd0d4a9d54f03fed))
|
|
46
|
+
|
|
1
47
|
## [17.1.3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v17.1.2...v17.1.3) (2023-04-03)
|
|
2
48
|
|
|
3
49
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Matrix Theme NPM Package",
|
|
6
6
|
"author": "",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@react-icons/all-files": "^4.1.0",
|
|
27
27
|
"gatsby": "^4.20.0",
|
|
28
|
-
"gatsby-core-theme": "
|
|
28
|
+
"gatsby-core-theme": "19.0.1",
|
|
29
29
|
"gatsby-plugin-sharp": "^4.10.2",
|
|
30
30
|
"gatsby-plugin-sitemap": "^3.3.0",
|
|
31
31
|
"gatsby-transformer-sharp": "^4.10.0",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
overflow: hidden;
|
|
5
5
|
background: #fff;
|
|
6
6
|
border-radius: var(--border-radius);
|
|
7
|
-
border:
|
|
7
|
+
border: var(--cards-border);
|
|
8
8
|
position: relative;
|
|
9
9
|
a{
|
|
10
10
|
span{
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
min-height: 27rem;
|
|
25
25
|
height: auto;
|
|
26
26
|
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
27
28
|
|
|
28
29
|
.cardWrapper {
|
|
29
30
|
display: flex;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
+
import React, { useContext } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import loadable from '@loadable/component';
|
|
5
|
+
import { BiLike } from '@react-icons/all-files/bi/BiLike';
|
|
6
|
+
import { BiDislike } from '@react-icons/all-files/bi/BiDislike';
|
|
7
|
+
import { FaArrowRight } from '@react-icons/all-files/fa/FaArrowRight';
|
|
8
|
+
import {
|
|
9
|
+
getAltText,
|
|
10
|
+
imagePrettyUrl,
|
|
11
|
+
translate,
|
|
12
|
+
prettyTracker,
|
|
13
|
+
} from 'gatsby-core-theme/src/helpers/getters';
|
|
14
|
+
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
15
|
+
import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
16
|
+
import Bonus from 'gatsby-core-theme/src/components/atoms/bonus';
|
|
17
|
+
import ReviewLink from 'gatsby-core-theme/src/components/atoms/review-link';
|
|
18
|
+
import { Context } from 'gatsby-core-theme/src/context/MainProvider';
|
|
19
|
+
import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta-button';
|
|
20
|
+
import Rating from '../../../rating';
|
|
21
|
+
import styles from './template-four.module.scss';
|
|
22
|
+
|
|
23
|
+
const TemplateFour = ({
|
|
24
|
+
item,
|
|
25
|
+
useOneStarRating = true,
|
|
26
|
+
page,
|
|
27
|
+
showHalfStars = false,
|
|
28
|
+
showBonusAsLink = false,
|
|
29
|
+
showAuthor = true,
|
|
30
|
+
verifyIcon = '../../../images/verify.svg',
|
|
31
|
+
}) => {
|
|
32
|
+
const { relation, path } = item;
|
|
33
|
+
const { name, status } = relation;
|
|
34
|
+
const reviewPath = path || relation.path;
|
|
35
|
+
const isInactive = status === 'inactive';
|
|
36
|
+
const prettyLink = prettyTracker(relation, 'main', false, page?.template);
|
|
37
|
+
const { translations } = useContext(Context) || {};
|
|
38
|
+
const StarRating = useOneStarRating
|
|
39
|
+
? loadable(() => import('gatsby-core-theme/src/components/molecules/star-rating/one-star'))
|
|
40
|
+
: loadable(() => import('gatsby-core-theme/src/components/molecules/star-rating'));
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<div className={styles.operatorCard}>
|
|
44
|
+
<div className={styles.cardHeader}>
|
|
45
|
+
<Link to={reviewPath} title={name} className={`${styles.casinoLogo} operator-card-gtm`}>
|
|
46
|
+
<LazyImage
|
|
47
|
+
width={88}
|
|
48
|
+
height={88}
|
|
49
|
+
src={imagePrettyUrl(relation?.standardised_logo_url_object?.filename, 88, 88)}
|
|
50
|
+
alt={getAltText(relation?.standardised_logo_url_object, name)}
|
|
51
|
+
/>
|
|
52
|
+
</Link>
|
|
53
|
+
<Link to={reviewPath} title={name} className="operator-card-gtm">
|
|
54
|
+
{name}
|
|
55
|
+
</Link>
|
|
56
|
+
<div className={styles.headerDetails}>
|
|
57
|
+
<StarRating numOfStars={5} halfStars={showHalfStars} rating={relation.rating} />
|
|
58
|
+
{showAuthor && item?.author && (
|
|
59
|
+
<div className={styles.authorData}>
|
|
60
|
+
<LazyImage
|
|
61
|
+
alt={item?.author?.name}
|
|
62
|
+
loading="eager"
|
|
63
|
+
width={20}
|
|
64
|
+
height={20}
|
|
65
|
+
src={imagePrettyUrl(item?.author?.image, 20, 20)}
|
|
66
|
+
/>
|
|
67
|
+
<span>
|
|
68
|
+
<LazyImage
|
|
69
|
+
src={verifyIcon}
|
|
70
|
+
alt={translate(translations, 'verified', 'Verified')}
|
|
71
|
+
width={10}
|
|
72
|
+
height={10}
|
|
73
|
+
/>
|
|
74
|
+
</span>
|
|
75
|
+
</div>
|
|
76
|
+
)}
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
<div className={styles.cardContent}>
|
|
80
|
+
<Rating item={relation} type="operatorCards" />
|
|
81
|
+
<div className={styles.cardContentContainer}>
|
|
82
|
+
{!isInactive && (
|
|
83
|
+
<div className={styles.casinoText}>
|
|
84
|
+
{showBonusAsLink ? (
|
|
85
|
+
<a
|
|
86
|
+
href={prettyLink}
|
|
87
|
+
target="_blank"
|
|
88
|
+
rel="noreferrer"
|
|
89
|
+
className={`${styles.text} toplist-gtm bonus-cta`}
|
|
90
|
+
>
|
|
91
|
+
<Bonus item={relation} tracker="main" />
|
|
92
|
+
</a>
|
|
93
|
+
) : (
|
|
94
|
+
<Bonus item={relation} tracker="main" />
|
|
95
|
+
)}
|
|
96
|
+
</div>
|
|
97
|
+
)}
|
|
98
|
+
<div className={styles.cardFooter}>
|
|
99
|
+
{relation?.status !== 'not_recommended' && (
|
|
100
|
+
<OperatorCta
|
|
101
|
+
tracker="main"
|
|
102
|
+
operator={relation}
|
|
103
|
+
translationsObj={{
|
|
104
|
+
active: { translationKey: 'play_now', defaultValue: 'Play Now' },
|
|
105
|
+
not_recommended: {
|
|
106
|
+
translationKey: 'not_recommended',
|
|
107
|
+
defaultValue: 'Not Recommended',
|
|
108
|
+
},
|
|
109
|
+
coming_soon: { translationKey: 'coming_soon', defaultValue: 'Soon Available' },
|
|
110
|
+
inactive: {
|
|
111
|
+
translationKey: 'inactive',
|
|
112
|
+
defaultValue: 'Not Accepting New Players',
|
|
113
|
+
},
|
|
114
|
+
blacklisted: { translationKey: 'blacklisted', defaultValue: 'Blacklisted' },
|
|
115
|
+
}}
|
|
116
|
+
gtmClass="operator-card-gtm btn-cta"
|
|
117
|
+
pageTemplate={page?.template}
|
|
118
|
+
icon={<FaArrowRight />}
|
|
119
|
+
/>
|
|
120
|
+
)}
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
<div className={styles.feedback}>
|
|
124
|
+
{(page?.true_votes || page?.false_votes) && (
|
|
125
|
+
<div className={styles.feedbackCounter}>
|
|
126
|
+
{page?.true_votes && (
|
|
127
|
+
<div className={styles.likes}>
|
|
128
|
+
<BiLike color="#3E3C47" />
|
|
129
|
+
{page?.true_votes}
|
|
130
|
+
</div>
|
|
131
|
+
)}
|
|
132
|
+
{page?.false_votes && (
|
|
133
|
+
<div className={styles.dislikes}>
|
|
134
|
+
<BiDislike color="#3E3C47" />
|
|
135
|
+
{page?.false_votes}
|
|
136
|
+
</div>
|
|
137
|
+
)}
|
|
138
|
+
</div>
|
|
139
|
+
)}
|
|
140
|
+
<ReviewLink
|
|
141
|
+
className={`${styles.reviewLink} operator-card-gtm`}
|
|
142
|
+
template={page?.template}
|
|
143
|
+
operatorName={name}
|
|
144
|
+
reviewPath={reviewPath}
|
|
145
|
+
/>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
TemplateFour.propTypes = {
|
|
153
|
+
item: PropTypes.shape({
|
|
154
|
+
relation: PropTypes.shape({
|
|
155
|
+
rating: PropTypes.string,
|
|
156
|
+
name: PropTypes.string,
|
|
157
|
+
path: PropTypes.string,
|
|
158
|
+
status: PropTypes.string,
|
|
159
|
+
standardised_logo_url_object: PropTypes.shape({
|
|
160
|
+
filename: PropTypes.string,
|
|
161
|
+
}),
|
|
162
|
+
}),
|
|
163
|
+
path: PropTypes.string,
|
|
164
|
+
author: PropTypes.shape({
|
|
165
|
+
name: PropTypes.string,
|
|
166
|
+
image: PropTypes.string,
|
|
167
|
+
}),
|
|
168
|
+
}).isRequired,
|
|
169
|
+
useOneStarRating: PropTypes.bool,
|
|
170
|
+
page: PropTypes.shape({
|
|
171
|
+
template: PropTypes.string,
|
|
172
|
+
true_votes: PropTypes.number,
|
|
173
|
+
false_votes: PropTypes.number,
|
|
174
|
+
type: PropTypes.string,
|
|
175
|
+
}),
|
|
176
|
+
showHalfStars: PropTypes.bool,
|
|
177
|
+
showBonusAsLink: PropTypes.bool,
|
|
178
|
+
showAuthor: PropTypes.bool,
|
|
179
|
+
verifyIcon: PropTypes.string,
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export default TemplateFour;
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
.operatorCard{
|
|
2
|
+
width: 100%;
|
|
3
|
+
background: #fff;
|
|
4
|
+
border-radius: var(--border-radius);
|
|
5
|
+
border: var(--cards-border);
|
|
6
|
+
position: relative;
|
|
7
|
+
min-height: 27rem;
|
|
8
|
+
@include flex-direction(column);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.cardContent {
|
|
12
|
+
@include flex-direction(column);
|
|
13
|
+
@include flex-align(stretch, space-between);
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
color: var(--color-44);
|
|
17
|
+
gap: 1.6rem;
|
|
18
|
+
|
|
19
|
+
a {
|
|
20
|
+
letter-spacing: 0.002em;
|
|
21
|
+
text-align: center;
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
ul {
|
|
26
|
+
padding: 0 1.6rem;
|
|
27
|
+
grid-template-columns: 1fr 1fr 1fr;
|
|
28
|
+
overflow: inherit;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
|
|
31
|
+
li {
|
|
32
|
+
min-height: 4rem;
|
|
33
|
+
min-width: 4rem;
|
|
34
|
+
padding: 1.2rem 0.8rem;
|
|
35
|
+
|
|
36
|
+
p {
|
|
37
|
+
> div {
|
|
38
|
+
margin: 0;
|
|
39
|
+
|
|
40
|
+
@include min(laptop) {
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
@include min(laptop) {
|
|
44
|
+
> div,
|
|
45
|
+
> div > span:last-child {
|
|
46
|
+
font-weight: 700;
|
|
47
|
+
font-size: 12px;
|
|
48
|
+
line-height: 20px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.casinoText {
|
|
57
|
+
@include flex-align(flex-start, space-between);
|
|
58
|
+
width: 100%;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
|
|
62
|
+
span {
|
|
63
|
+
width: 100%;
|
|
64
|
+
font-style: normal;
|
|
65
|
+
font-weight: 600;
|
|
66
|
+
font-size: 1.6rem;
|
|
67
|
+
line-height: 2.7rem;
|
|
68
|
+
@include flex-align(center, center);
|
|
69
|
+
text-align: center;
|
|
70
|
+
text-transform: capitalize;
|
|
71
|
+
color: var(--color-50);
|
|
72
|
+
padding: 0;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.cardFooter {
|
|
77
|
+
width: 100%;
|
|
78
|
+
color: var(--color-44);
|
|
79
|
+
|
|
80
|
+
@include min(tablet) {
|
|
81
|
+
@include flex-direction(column);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@include min(laptop) {
|
|
85
|
+
margin-top: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
a {
|
|
89
|
+
width: 100%;
|
|
90
|
+
height: 5.6rem;
|
|
91
|
+
font-weight: 700;
|
|
92
|
+
text-transform: capitalize;
|
|
93
|
+
color: var(--color-4);
|
|
94
|
+
font-size: 1.8rem;
|
|
95
|
+
line-height: 2rem;
|
|
96
|
+
gap: 0.4rem;
|
|
97
|
+
text-decoration: none;
|
|
98
|
+
|
|
99
|
+
@include flex-align(center, center);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
a:last-of-type {
|
|
103
|
+
align-self: center;
|
|
104
|
+
width: 100%;
|
|
105
|
+
margin-top: 0;
|
|
106
|
+
margin-bottom: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@include max(tablet) {
|
|
110
|
+
a[class*='button'] {
|
|
111
|
+
width: 100%;
|
|
112
|
+
margin-bottom: 0.5rem;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.reviewLink {
|
|
118
|
+
color: var(--color-53);
|
|
119
|
+
font-size: 1.6rem;
|
|
120
|
+
font-weight: bold;
|
|
121
|
+
margin-top: 0;
|
|
122
|
+
margin-bottom: 1rem;
|
|
123
|
+
text-decoration-line: underline;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.cardHeader {
|
|
127
|
+
display: grid;
|
|
128
|
+
grid-template-columns: auto 1fr;
|
|
129
|
+
grid-template-rows: auto auto;
|
|
130
|
+
border-radius: var(--cards-border-radius) var(--cards-border-radius) 0 0;
|
|
131
|
+
padding: 1.6rem;
|
|
132
|
+
gap: 0.4rem 1.6rem;
|
|
133
|
+
|
|
134
|
+
.casinoLogo {
|
|
135
|
+
display: flex;
|
|
136
|
+
border-radius: var(--cards-border-radius);
|
|
137
|
+
text-align: center;
|
|
138
|
+
grid-row: 1/3;
|
|
139
|
+
grid-column: 1/2;
|
|
140
|
+
border: var(--cards-border);
|
|
141
|
+
border-radius: 16px;
|
|
142
|
+
|
|
143
|
+
img {
|
|
144
|
+
width: 8.8rem;
|
|
145
|
+
height: 8.8rem;
|
|
146
|
+
object-fit: contain;
|
|
147
|
+
border-radius: var(--cards-border-radius);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
a {
|
|
152
|
+
@include flex-direction(column);
|
|
153
|
+
@include flex-align(flex-start, flex-end);
|
|
154
|
+
color: #161005;
|
|
155
|
+
font-weight: 700;
|
|
156
|
+
font-size: 1.8rem;
|
|
157
|
+
line-height: 2.8rem;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.headerDetails {
|
|
162
|
+
@include flex-align(flex-start, flex-start);
|
|
163
|
+
gap: 0.8rem;
|
|
164
|
+
|
|
165
|
+
> div {
|
|
166
|
+
border: none;
|
|
167
|
+
background: transparent;
|
|
168
|
+
margin: 0;
|
|
169
|
+
font-size: 1.4rem;
|
|
170
|
+
line-height: 2.2rem;
|
|
171
|
+
font-weight: 700;
|
|
172
|
+
justify-content: flex-start;
|
|
173
|
+
min-width: auto;
|
|
174
|
+
|
|
175
|
+
> span:last-child {
|
|
176
|
+
font-size: 1.2rem;
|
|
177
|
+
line-height: 2rem;
|
|
178
|
+
font-weight: 700;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.authorData {
|
|
184
|
+
position: relative;
|
|
185
|
+
|
|
186
|
+
> img {
|
|
187
|
+
border: var(--cards-image-border);
|
|
188
|
+
border-radius: 50%;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
> span {
|
|
192
|
+
position: absolute;
|
|
193
|
+
width: 10px;
|
|
194
|
+
height: 20px;
|
|
195
|
+
bottom: -1.7px;
|
|
196
|
+
right: -1.7px;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.cardContentContainer {
|
|
201
|
+
padding: 1.6rem;
|
|
202
|
+
@include flex-direction(column);
|
|
203
|
+
@include flex-align(flex-start, space-between);
|
|
204
|
+
border: 1.5px dashed var(--color-55);
|
|
205
|
+
border-radius: 1.2rem;
|
|
206
|
+
background: var(--color-54);
|
|
207
|
+
margin: 0 1.6rem 0.8rem;
|
|
208
|
+
gap: 1.6rem;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.feedback {
|
|
212
|
+
@include flex-align(center, space-between);
|
|
213
|
+
padding: 0.8rem 1.6rem 1.2rem;
|
|
214
|
+
gap: 2.4rem;
|
|
215
|
+
border-top: 1.5px solid var(--color-52);
|
|
216
|
+
|
|
217
|
+
a {
|
|
218
|
+
font-weight: 700;
|
|
219
|
+
font-size: 1.2rem;
|
|
220
|
+
line-height: 1.8rem;
|
|
221
|
+
text-align: right;
|
|
222
|
+
text-decoration-line: underline;
|
|
223
|
+
color: var(--color-53);
|
|
224
|
+
margin: 0;
|
|
225
|
+
width: auto;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.feedbackCounter {
|
|
230
|
+
@include flex-align(center, space-between);
|
|
231
|
+
gap: 1.6rem;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.likes,
|
|
235
|
+
.dislikes {
|
|
236
|
+
@include flex-align(center, space-between);
|
|
237
|
+
gap: 0.4rem;
|
|
238
|
+
font-weight: 700;
|
|
239
|
+
font-size: 1.2rem;
|
|
240
|
+
line-height: 2rem;
|
|
241
|
+
color: var(--color-57);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.storybook {
|
|
245
|
+
.operatorCard {
|
|
246
|
+
max-width: 34.3rem;
|
|
247
|
+
margin: 0 auto,
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.cardContent {
|
|
251
|
+
li p {
|
|
252
|
+
@include min(laptop) {
|
|
253
|
+
> div,
|
|
254
|
+
> div > span:last-child {
|
|
255
|
+
font-weight: 700;
|
|
256
|
+
font-size: inherit;
|
|
257
|
+
line-height: 20px;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
+
import React from 'react';
|
|
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
|
+
import verifyIcon from '../../../../../../storybook-images/verify.svg';
|
|
12
|
+
import TemplateFour from '.';
|
|
13
|
+
import styles from './template-four.module.scss';
|
|
14
|
+
|
|
15
|
+
const operatorData = getSampleOperatorCards();
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
title: 'Matrix-Theme/Modules/Cards/Operator/Template Four',
|
|
19
|
+
component: TemplateFour,
|
|
20
|
+
argTypes: {
|
|
21
|
+
item: {
|
|
22
|
+
name: 'item',
|
|
23
|
+
type: { name: 'object', required: true },
|
|
24
|
+
defaultValue: operatorData.items[0],
|
|
25
|
+
description: 'item',
|
|
26
|
+
},
|
|
27
|
+
verifyIcon: {
|
|
28
|
+
name: 'verifyIcon',
|
|
29
|
+
type: { name: 'string', required: false },
|
|
30
|
+
defaultValue: verifyIcon,
|
|
31
|
+
description: 'verify icon',
|
|
32
|
+
},
|
|
33
|
+
page: {
|
|
34
|
+
name: 'page',
|
|
35
|
+
type: { name: 'object', required: false },
|
|
36
|
+
defaultValue: { template: 'operator_review', true_votes: 134, false_votes: 20 },
|
|
37
|
+
description: 'page template',
|
|
38
|
+
},
|
|
39
|
+
useOneStarRating: {
|
|
40
|
+
name: 'useOneStarRating',
|
|
41
|
+
type: { name: 'boolean', required: false },
|
|
42
|
+
defaultValue: true,
|
|
43
|
+
description: 'useOneStarRating',
|
|
44
|
+
},
|
|
45
|
+
showHalfStars: {
|
|
46
|
+
name: 'showHalfStars',
|
|
47
|
+
type: { name: 'boolean', required: false },
|
|
48
|
+
defaultValue: false,
|
|
49
|
+
description: 'show Half Stars? Will only work if useOneStarRating is set to false',
|
|
50
|
+
},
|
|
51
|
+
showBonusAsLink: {
|
|
52
|
+
name: 'showBonusAsLink',
|
|
53
|
+
type: { name: 'boolean', required: false },
|
|
54
|
+
defaultValue: false,
|
|
55
|
+
description: 'show Bonus as a Link?',
|
|
56
|
+
},
|
|
57
|
+
showAuthor: {
|
|
58
|
+
name: 'showAuthor',
|
|
59
|
+
type: { name: 'boolean', required: false },
|
|
60
|
+
defaultValue: true,
|
|
61
|
+
description: 'show author?',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
parameters: {
|
|
65
|
+
docs: {
|
|
66
|
+
description: {
|
|
67
|
+
component: 'A Default Footer Component - Template One',
|
|
68
|
+
},
|
|
69
|
+
page: () => (
|
|
70
|
+
<>
|
|
71
|
+
<Title />
|
|
72
|
+
<Description />
|
|
73
|
+
<Primary />
|
|
74
|
+
<ArgsTable story={PRIMARY_STORY} />
|
|
75
|
+
</>
|
|
76
|
+
),
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const Template = (args) => (
|
|
82
|
+
<div className={styles.storybook}>
|
|
83
|
+
<TemplateFour {...args} />
|
|
84
|
+
</div>
|
|
85
|
+
);
|
|
86
|
+
export const Default = Template.bind({});
|
|
87
|
+
Default.args = {};
|