gatsby-core-theme 30.0.52 → 30.0.54
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/.ci.yml +1 -1
- package/CHANGELOG.md +27 -0
- package/package.json +1 -1
- package/src/components/molecules/pagination/pagination.module.scss +34 -5
- package/src/components/molecules/spotlights_v2/icon/template-one/index.js +5 -3
- package/src/components/molecules/spotlights_v2/image/template-one/index.js +24 -21
- package/src/components/molecules/spotlights_v2/image/template-two/index.js +21 -11
- package/src/components/molecules/spotlights_v2/image-text/template-one/index.js +10 -3
- package/src/components/molecules/spotlights_v2/image-text/template-one/template-one.stories.js +14 -1
- package/src/components/molecules/spotlights_v2/image-text/template-three/index.js +6 -0
- package/src/components/molecules/spotlights_v2/image-text/template-three/item/index.js +11 -3
- package/src/components/molecules/spotlights_v2/image-text/template-three/template-three.stories.js +14 -1
- package/src/components/molecules/spotlights_v2/image-text/template-two/index.js +10 -3
- package/src/components/molecules/spotlights_v2/image-text/template-two/template-two.stories.js +14 -1
- package/src/components/organisms/search/index.js +10 -3
- package/src/components/organisms/toplist/index.js +2 -1
- package/src/components/organisms/toplist/list/index.js +3 -0
package/.ci.yml
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
## [30.0.54](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v30.0.53...v30.0.54) (2024-01-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add placeholder props ([b08c89d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/b08c89d6e20cacdf525b6ef27c9a9548318afdf6))
|
|
7
|
+
* add specific sematic-release ([1b948a5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1b948a569794f3b61f4283cf32f2aef41946c0fc))
|
|
8
|
+
* semantic-release fix ([3a2b0e9](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/3a2b0e9eb93d73a8c536806b74f4e6d9a285c39a))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Code Refactoring
|
|
12
|
+
|
|
13
|
+
* add read more text ([2e2f45b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/2e2f45be5210e56eb1f258ad8753a9e02dc1889c))
|
|
14
|
+
* add translations and context ([5d8d926](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5d8d926c7a2200bd090bd9f154659c2536610731))
|
|
15
|
+
* fix no link issue for spotlights and add variations for button types ([590fe20](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/590fe2010f02ca2009f4fc7d2a30d878269f5a82))
|
|
16
|
+
* update link text and backup text ([cabb1a0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/cabb1a073e3578e6f826cf192508e297dd9ce2c1))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
* Merge branch 'tm-3334-spotlights' into 'master' ([6d66760](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6d667604596dee02c73754598318bc72d31d0583))
|
|
20
|
+
|
|
21
|
+
## [30.0.53](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v30.0.52...v30.0.53) (2024-01-12)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* added page path to toplist row ([753bc26](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/753bc26caeb1f135d96374d6a6716585cd8efcbc))
|
|
27
|
+
|
|
1
28
|
## [30.0.52](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v30.0.51...v30.0.52) (2024-01-12)
|
|
2
29
|
|
|
3
30
|
|
package/package.json
CHANGED
|
@@ -41,27 +41,49 @@
|
|
|
41
41
|
|
|
42
42
|
a,
|
|
43
43
|
span {
|
|
44
|
-
color: var(--pagination-active-color, #2e3337);
|
|
45
44
|
@extend .padd;
|
|
45
|
+
color: var(--pagination-active-color, #2e3337);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
a {
|
|
49
|
+
&:hover,
|
|
50
|
+
&:focus {
|
|
51
|
+
background-color: var(--pagination-hover-background-color, var(--pagination-background-color, #eeebe5));
|
|
52
|
+
color: var(--pagination-active-hover-color, var(--pagination-active-color, #2e3337));
|
|
53
|
+
}
|
|
46
54
|
}
|
|
47
55
|
|
|
48
56
|
.button {
|
|
57
|
+
@extend .padd;
|
|
49
58
|
cursor: not-allowed;
|
|
50
59
|
color: var(--pagination-inactive-color, #ffffff);
|
|
51
60
|
fill: var(--pagination-inactive-color, #ffffff);
|
|
52
61
|
background-color: var(--pagination-inactive-background-color, var(--pagination-background-color, #eeebe5));
|
|
53
|
-
|
|
62
|
+
width: calc(var(--pagination-button-width, var(--pagination-width, 4rem)) - 1rem);
|
|
63
|
+
height: calc(var(--pagination-button-height, var(--pagination-height, 4rem)) - 1rem);
|
|
64
|
+
|
|
65
|
+
@include min(mobile) {
|
|
66
|
+
width: var(--pagination-button-width, var(--pagination-width, 4rem));
|
|
67
|
+
height: var(--pagination-button-height, var(--pagination-height, 4rem));
|
|
68
|
+
}
|
|
54
69
|
|
|
55
70
|
> svg {
|
|
56
71
|
opacity: var(--pagination-inactive-opacity, 1);
|
|
57
72
|
}
|
|
58
73
|
|
|
59
74
|
&.isActive {
|
|
60
|
-
color: var(--pagination-active-color, #2e3337);
|
|
61
|
-
fill: var(--pagination-active-color, #2e3337);
|
|
62
|
-
background-color: var(--pagination-background-color, #eeebe5);
|
|
75
|
+
color: var(--pagination-active-button-color, var(--pagination-active-color, #2e3337));
|
|
76
|
+
fill: var(--pagination-active-button-color, var(--pagination-active-color, #2e3337));
|
|
77
|
+
background-color: var(--pagination-active-background-color, var(--pagination-background-color, #eeebe5));
|
|
63
78
|
cursor: pointer;
|
|
64
79
|
|
|
80
|
+
&:hover,
|
|
81
|
+
&:focus {
|
|
82
|
+
color: var(--pagination-active-button-hover-color, var(--pagination-active-button-color, #2e3337));
|
|
83
|
+
fill: var(--pagination-active-button-hover-color, var(--pagination-active-button-color, #2e3337));
|
|
84
|
+
background-color: var(--pagination-active-hover-background-color, var(--pagination-active-background-color, #eeebe5));
|
|
85
|
+
}
|
|
86
|
+
|
|
65
87
|
> svg {
|
|
66
88
|
opacity: 1;
|
|
67
89
|
}
|
|
@@ -74,6 +96,13 @@
|
|
|
74
96
|
background-color: var(--pagination-current-page-background-color, #2e3337);
|
|
75
97
|
border: var(--pagination-current-page-border, var(--pagination-border, none));
|
|
76
98
|
font-weight: var(--pagination-active-font-weight, 700);
|
|
99
|
+
|
|
100
|
+
&:hover,
|
|
101
|
+
&:focus {
|
|
102
|
+
color: var(--pagination-current-page-hover-color, var(--pagination-current-page-color, #ffffff));
|
|
103
|
+
background-color: var(--pagination-current-page-hover-background-color, var(--pagination-current-page-background-color, #2e3337));
|
|
104
|
+
border: var(--pagination-current-page-hover-border, var(--pagination-current-page-border, var(--pagination-border, none)));
|
|
105
|
+
}
|
|
77
106
|
}
|
|
78
107
|
|
|
79
108
|
.showOfCurrent {
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import LazyImage from '../../../../../hooks/lazy-image';
|
|
4
|
+
import { Context } from '../../../../../context/MainProvider';
|
|
4
5
|
import Link from '../../../../../hooks/link';
|
|
5
|
-
import { imagePrettyUrl } from '../../../../../helpers/getters.mjs';
|
|
6
|
+
import { imagePrettyUrl, translate } from '../../../../../helpers/getters.mjs';
|
|
6
7
|
import styles from './template-one.module.scss';
|
|
7
8
|
|
|
8
9
|
export default function TemplateOne({ module }) {
|
|
9
10
|
const { items } = module;
|
|
11
|
+
const { translations } = useContext(Context) || {};
|
|
10
12
|
|
|
11
13
|
const content = (res) => (
|
|
12
14
|
<>
|
|
13
15
|
{res?.icon && (
|
|
14
16
|
<LazyImage height={106} width={106} src={imagePrettyUrl(res?.icon)} alt={res?.link_text} />
|
|
15
17
|
)}
|
|
16
|
-
|
|
18
|
+
<p>{res?.link_text || translate(translations, 'read_more', 'Read more')}</p>
|
|
17
19
|
{res.subtitle && <span>{res.subtitle}</span>}
|
|
18
20
|
</>
|
|
19
21
|
);
|
|
@@ -9,29 +9,32 @@ import styles from './template-one.module.scss';
|
|
|
9
9
|
export default function TemplateOne({ module }) {
|
|
10
10
|
const { items } = module;
|
|
11
11
|
const { translations } = useContext(Context) || {};
|
|
12
|
+
|
|
13
|
+
const content = (res) => (
|
|
14
|
+
<>
|
|
15
|
+
{res?.image && (
|
|
16
|
+
<LazyImage width={295} height={260} src={imagePrettyUrl(res?.image)} alt={res?.link_text} />
|
|
17
|
+
)}
|
|
18
|
+
{/* Need to talk to add this field on hercules */}
|
|
19
|
+
<p>
|
|
20
|
+
{res?.link_text || translate(translations, 'link_text_spotlights', 'Top Online Casinos')}
|
|
21
|
+
</p>
|
|
22
|
+
{res.subtitle && <span>{res.subtitle}</span>}
|
|
23
|
+
</>
|
|
24
|
+
);
|
|
25
|
+
|
|
12
26
|
return (
|
|
13
27
|
<div className={styles?.spotlightsImage || ''}>
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/>
|
|
25
|
-
)}
|
|
26
|
-
{/* Need to talk to add this field on hercules */}
|
|
27
|
-
<p>
|
|
28
|
-
{res?.link_text}{' '}
|
|
29
|
-
{translate(translations, 'link_text_spotlights', 'Top Online Casinos')}
|
|
30
|
-
</p>
|
|
31
|
-
{res.subtitle && <span>{res.subtitle}</span>}
|
|
32
|
-
</Link>
|
|
33
|
-
))
|
|
34
|
-
}
|
|
28
|
+
{items?.map((res) => {
|
|
29
|
+
if (res.link?.value) {
|
|
30
|
+
return (
|
|
31
|
+
<Link to={res?.link?.value} external={res?.link?.type === 'external'}>
|
|
32
|
+
{content(res)}
|
|
33
|
+
</Link>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
return <div>{content(res)}</div>;
|
|
37
|
+
})}
|
|
35
38
|
</div>
|
|
36
39
|
);
|
|
37
40
|
}
|
|
@@ -10,21 +10,31 @@ import styles from './template-two.module.scss';
|
|
|
10
10
|
export default function TemplateOne({ module }) {
|
|
11
11
|
const { items } = module;
|
|
12
12
|
const { translations } = useContext(Context) || {};
|
|
13
|
+
|
|
14
|
+
const content = (res) => (
|
|
15
|
+
<>
|
|
16
|
+
{res?.image && <LazyImage src={imagePrettyUrl(res?.image)} />}
|
|
17
|
+
<p>
|
|
18
|
+
{res?.link_text || translate(translations, 'link_text_spotlights', 'Top Online Casinos')}{' '}
|
|
19
|
+
<FaArrowRight size={20} color="#fff" />
|
|
20
|
+
</p>
|
|
21
|
+
{res.subtitle && <span>{res.subtitle}</span>}
|
|
22
|
+
</>
|
|
23
|
+
);
|
|
13
24
|
return (
|
|
14
25
|
<div className={styles?.spotlightsImage || ''}>
|
|
15
26
|
{
|
|
16
27
|
// eslint-disable-next-line react/prop-types
|
|
17
|
-
items?.map((res) =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
))
|
|
28
|
+
items?.map((res) => {
|
|
29
|
+
if (res.link?.value) {
|
|
30
|
+
return (
|
|
31
|
+
<Link to={res?.link?.value} external={res?.link?.type === 'external'}>
|
|
32
|
+
{content(res)}
|
|
33
|
+
</Link>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
return <div>{content(res)}</div>;
|
|
37
|
+
})
|
|
28
38
|
}
|
|
29
39
|
</div>
|
|
30
40
|
);
|
|
@@ -7,7 +7,12 @@ import { imagePrettyUrl, translate } from '../../../../../helpers/getters.mjs';
|
|
|
7
7
|
import { Context } from '../../../../../context/MainProvider';
|
|
8
8
|
import styles from './template-one.module.scss';
|
|
9
9
|
|
|
10
|
-
export default function TemplateOne({
|
|
10
|
+
export default function TemplateOne({
|
|
11
|
+
module,
|
|
12
|
+
scrollableContent = false,
|
|
13
|
+
buttonType = 'secondary',
|
|
14
|
+
buttonSize = 'm',
|
|
15
|
+
}) {
|
|
11
16
|
const { items } = module;
|
|
12
17
|
const { translations } = useContext(Context) || {};
|
|
13
18
|
|
|
@@ -34,8 +39,8 @@ export default function TemplateOne({ module, scrollableContent = false }) {
|
|
|
34
39
|
{res?.link?.value && (
|
|
35
40
|
<Button
|
|
36
41
|
icon={<FaArrowRight />}
|
|
37
|
-
buttonType=
|
|
38
|
-
buttonSize=
|
|
42
|
+
buttonType={buttonType}
|
|
43
|
+
buttonSize={buttonSize}
|
|
39
44
|
isInternalLink={res?.link?.type !== 'external'}
|
|
40
45
|
targetBlank={res?.link?.type !== 'page'}
|
|
41
46
|
to={res?.link?.value}
|
|
@@ -58,4 +63,6 @@ TemplateOne.propTypes = {
|
|
|
58
63
|
items: PropTypes.shape({}),
|
|
59
64
|
}).isRequired,
|
|
60
65
|
scrollableContent: PropTypes.bool,
|
|
66
|
+
buttonType: PropTypes.string,
|
|
67
|
+
buttonSize: PropTypes.string,
|
|
61
68
|
};
|
package/src/components/molecules/spotlights_v2/image-text/template-one/template-one.stories.js
CHANGED
|
@@ -12,7 +12,20 @@ import TemplateOne from '.';
|
|
|
12
12
|
export default {
|
|
13
13
|
title: 'Theme/Modules/Spotlight/Image Text/Template One',
|
|
14
14
|
component: TemplateOne,
|
|
15
|
-
argTypes: {
|
|
15
|
+
argTypes: {
|
|
16
|
+
buttonType: {
|
|
17
|
+
name: 'buttonType',
|
|
18
|
+
defaultValue: 'secondary',
|
|
19
|
+
options: ['primary', 'secondary', 'tertiary'],
|
|
20
|
+
control: { type: 'radio' },
|
|
21
|
+
},
|
|
22
|
+
buttonSize: {
|
|
23
|
+
name: 'buttonType',
|
|
24
|
+
defaultValue: 'm',
|
|
25
|
+
options: ['xs', 's', 'm', 'l', 'xl', 'noSize'],
|
|
26
|
+
control: { type: 'radio' },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
16
29
|
parameters: {
|
|
17
30
|
docs: {
|
|
18
31
|
description: {
|
|
@@ -8,6 +8,8 @@ export default function TemplateOne({
|
|
|
8
8
|
readMore = true,
|
|
9
9
|
scrollableContent = false,
|
|
10
10
|
characterMaxReadMore = 600,
|
|
11
|
+
buttonType = 'secondary',
|
|
12
|
+
buttonSize = 'm',
|
|
11
13
|
}) {
|
|
12
14
|
const { items } = module;
|
|
13
15
|
return (
|
|
@@ -22,6 +24,8 @@ export default function TemplateOne({
|
|
|
22
24
|
item={res}
|
|
23
25
|
readMore={readMoreCheck ? readMore : false}
|
|
24
26
|
scrollableContent={scrollableContent}
|
|
27
|
+
buttonType={buttonType}
|
|
28
|
+
buttonSize={buttonSize}
|
|
25
29
|
/>
|
|
26
30
|
);
|
|
27
31
|
})
|
|
@@ -37,4 +41,6 @@ TemplateOne.propTypes = {
|
|
|
37
41
|
readMore: PropTypes.bool,
|
|
38
42
|
scrollableContent: PropTypes.bool,
|
|
39
43
|
characterMaxReadMore: PropTypes.number,
|
|
44
|
+
buttonType: PropTypes.string,
|
|
45
|
+
buttonSize: PropTypes.string,
|
|
40
46
|
};
|
|
@@ -11,7 +11,13 @@ import { imagePrettyUrl, translate } from '../../../../../../helpers/getters.mjs
|
|
|
11
11
|
import { Context } from '../../../../../../context/MainProvider';
|
|
12
12
|
import styles from './style.module.scss';
|
|
13
13
|
|
|
14
|
-
export default function TemplateOne({
|
|
14
|
+
export default function TemplateOne({
|
|
15
|
+
item,
|
|
16
|
+
readMore = false,
|
|
17
|
+
scrollableContent = false,
|
|
18
|
+
buttonType = 'secondary',
|
|
19
|
+
buttonSize = 'm',
|
|
20
|
+
}) {
|
|
15
21
|
const { translations } = useContext(Context) || {};
|
|
16
22
|
const [showMore, setShowMore] = useState(false);
|
|
17
23
|
const TitleTag = item?.title_tag || 'label';
|
|
@@ -47,8 +53,8 @@ export default function TemplateOne({ item, readMore = false, scrollableContent
|
|
|
47
53
|
{item?.link?.value && (
|
|
48
54
|
<Button
|
|
49
55
|
icon={<FaArrowRight />}
|
|
50
|
-
buttonType=
|
|
51
|
-
buttonSize=
|
|
56
|
+
buttonType={buttonType}
|
|
57
|
+
buttonSize={buttonSize}
|
|
52
58
|
isInternalLink={item?.link?.type !== 'external'}
|
|
53
59
|
targetBlank={item?.link?.type !== 'page'}
|
|
54
60
|
to={item?.link?.value}
|
|
@@ -75,4 +81,6 @@ TemplateOne.propTypes = {
|
|
|
75
81
|
}).isRequired,
|
|
76
82
|
readMore: PropTypes.bool,
|
|
77
83
|
scrollableContent: PropTypes.bool,
|
|
84
|
+
buttonType: PropTypes.string,
|
|
85
|
+
buttonSize: PropTypes.string,
|
|
78
86
|
};
|
package/src/components/molecules/spotlights_v2/image-text/template-three/template-three.stories.js
CHANGED
|
@@ -12,7 +12,20 @@ import TemplateOne from '.';
|
|
|
12
12
|
export default {
|
|
13
13
|
title: 'Theme/Modules/Spotlight/Image Text/Template Three',
|
|
14
14
|
component: TemplateOne,
|
|
15
|
-
argTypes: {
|
|
15
|
+
argTypes: {
|
|
16
|
+
buttonType: {
|
|
17
|
+
name: 'buttonType',
|
|
18
|
+
defaultValue: 'secondary',
|
|
19
|
+
options: ['primary', 'secondary', 'tertiary'],
|
|
20
|
+
control: { type: 'radio' },
|
|
21
|
+
},
|
|
22
|
+
buttonSize: {
|
|
23
|
+
name: 'buttonType',
|
|
24
|
+
defaultValue: 'm',
|
|
25
|
+
options: ['xs', 's', 'm', 'l', 'xl', 'noSize'],
|
|
26
|
+
control: { type: 'radio' },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
16
29
|
parameters: {
|
|
17
30
|
docs: {
|
|
18
31
|
description: {
|
|
@@ -7,7 +7,12 @@ import { imagePrettyUrl, translate } from '../../../../../helpers/getters.mjs';
|
|
|
7
7
|
import { Context } from '../../../../../context/MainProvider';
|
|
8
8
|
import styles from './template-two.module.scss';
|
|
9
9
|
|
|
10
|
-
export default function TemplateOne({
|
|
10
|
+
export default function TemplateOne({
|
|
11
|
+
module,
|
|
12
|
+
scrollableContent = false,
|
|
13
|
+
buttonType = 'secondary',
|
|
14
|
+
buttonSize = 'm',
|
|
15
|
+
}) {
|
|
11
16
|
const { items } = module;
|
|
12
17
|
const { translations } = useContext(Context) || {};
|
|
13
18
|
|
|
@@ -33,8 +38,8 @@ export default function TemplateOne({ module, scrollableContent = false }) {
|
|
|
33
38
|
{res?.link?.value && (
|
|
34
39
|
<Button
|
|
35
40
|
icon={<FaArrowRight />}
|
|
36
|
-
buttonType=
|
|
37
|
-
buttonSize=
|
|
41
|
+
buttonType={buttonType}
|
|
42
|
+
buttonSize={buttonSize}
|
|
38
43
|
isInternalLink={res?.link?.type !== 'external'}
|
|
39
44
|
targetBlank={res?.link?.type !== 'page'}
|
|
40
45
|
to={res?.link?.value}
|
|
@@ -57,4 +62,6 @@ TemplateOne.propTypes = {
|
|
|
57
62
|
items: PropTypes.shape({}),
|
|
58
63
|
}).isRequired,
|
|
59
64
|
scrollableContent: PropTypes.bool,
|
|
65
|
+
buttonType: PropTypes.string,
|
|
66
|
+
buttonSize: PropTypes.string,
|
|
60
67
|
};
|
package/src/components/molecules/spotlights_v2/image-text/template-two/template-two.stories.js
CHANGED
|
@@ -12,7 +12,20 @@ import TemplateOne from '.';
|
|
|
12
12
|
export default {
|
|
13
13
|
title: 'Theme/Modules/Spotlight/Image Text/Template Two',
|
|
14
14
|
component: TemplateOne,
|
|
15
|
-
argTypes: {
|
|
15
|
+
argTypes: {
|
|
16
|
+
buttonType: {
|
|
17
|
+
name: 'buttonType',
|
|
18
|
+
defaultValue: 'secondary',
|
|
19
|
+
options: ['primary', 'secondary', 'tertiary'],
|
|
20
|
+
control: { type: 'radio' },
|
|
21
|
+
},
|
|
22
|
+
buttonSize: {
|
|
23
|
+
name: 'buttonType',
|
|
24
|
+
defaultValue: 'm',
|
|
25
|
+
options: ['xs', 's', 'm', 'l', 'xl', 'noSize'],
|
|
26
|
+
control: { type: 'radio' },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
16
29
|
parameters: {
|
|
17
30
|
docs: {
|
|
18
31
|
description: {
|
|
@@ -10,7 +10,13 @@ import { NavigationContext } from '../navigation/navigationContext';
|
|
|
10
10
|
|
|
11
11
|
import styles from './search.module.scss';
|
|
12
12
|
|
|
13
|
-
const SearchForm = ({
|
|
13
|
+
const SearchForm = ({
|
|
14
|
+
className,
|
|
15
|
+
searchIcon,
|
|
16
|
+
iconWidth = 24,
|
|
17
|
+
iconHeight = 24,
|
|
18
|
+
placeholder = null,
|
|
19
|
+
}) => {
|
|
14
20
|
const { showSearch, setShowSearch, setShowMenu, showMenu } = useContext(NavigationContext);
|
|
15
21
|
const [searchBoxQuery, setSearchBoxQuery] = useState();
|
|
16
22
|
const searchInputRef = useRef();
|
|
@@ -76,8 +82,8 @@ const SearchForm = ({ className, searchIcon, iconWidth = 24, iconHeight = 24 })
|
|
|
76
82
|
<form onSubmit={formSubmitBoxHandler} className={styles.form || ''}>
|
|
77
83
|
<input
|
|
78
84
|
type="text"
|
|
79
|
-
aria-label=
|
|
80
|
-
placeholder=
|
|
85
|
+
aria-label={placeholder || 'Search...'}
|
|
86
|
+
placeholder={placeholder || 'Search...'}
|
|
81
87
|
className={styles.formInput || ''}
|
|
82
88
|
maxLength="60"
|
|
83
89
|
ref={searchInputRef}
|
|
@@ -101,6 +107,7 @@ SearchForm.propTypes = {
|
|
|
101
107
|
iconWidth: PropTypes.number,
|
|
102
108
|
iconHeight: PropTypes.number,
|
|
103
109
|
pageContext: PropTypes.shape({}),
|
|
110
|
+
placeholder: PropTypes.string,
|
|
104
111
|
};
|
|
105
112
|
|
|
106
113
|
export default SearchForm;
|
|
@@ -15,6 +15,7 @@ const TopList = ({ module, toplistHeading, page }) => {
|
|
|
15
15
|
>
|
|
16
16
|
{toplistHeading}
|
|
17
17
|
<List
|
|
18
|
+
pagePath={page?.path}
|
|
18
19
|
toplist={toplist}
|
|
19
20
|
hasLoadMoreButton={toplist.show_load_more}
|
|
20
21
|
initItemsCount={toplist.num_items_initial_load}
|
|
@@ -38,7 +39,7 @@ TopList.propTypes = {
|
|
|
38
39
|
// eslint-disable-next-line react/forbid-prop-types
|
|
39
40
|
module: PropTypes.shape({ name: PropTypes.string, items: PropTypes.arrayOf(PropTypes.object) }),
|
|
40
41
|
toplistHeading: PropTypes.element,
|
|
41
|
-
page: PropTypes.shape({ template: PropTypes.string }),
|
|
42
|
+
page: PropTypes.shape({ template: PropTypes.string, path: PropTypes.string }),
|
|
42
43
|
};
|
|
43
44
|
|
|
44
45
|
export default TopList;
|
|
@@ -13,6 +13,7 @@ export default function List({
|
|
|
13
13
|
loadItemsCount,
|
|
14
14
|
pageTemplate,
|
|
15
15
|
module,
|
|
16
|
+
pagePath,
|
|
16
17
|
}) {
|
|
17
18
|
const initLoadItems = Number(initItemsCount) !== 0 ? Number(initItemsCount) : 10000;
|
|
18
19
|
const loadingItems = Number(loadItemsCount) !== 0 ? Number(loadItemsCount) : 10000;
|
|
@@ -40,6 +41,7 @@ export default function List({
|
|
|
40
41
|
<ul className={styles.list || ''} key={keygen()}>
|
|
41
42
|
{toplist.items.map((item, index) => (
|
|
42
43
|
<Row
|
|
44
|
+
pagePath={pagePath}
|
|
43
45
|
item={item}
|
|
44
46
|
tracker={toplist.tracker}
|
|
45
47
|
pageTemplate={pageTemplate}
|
|
@@ -81,4 +83,5 @@ List.propTypes = {
|
|
|
81
83
|
loadItemsCount: PropTypes.string,
|
|
82
84
|
pageTemplate: PropTypes.string,
|
|
83
85
|
module: PropTypes.string,
|
|
86
|
+
pagePath: PropTypes.string,
|
|
84
87
|
};
|