gatsby-core-theme 30.0.31 → 30.0.32
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 +19 -0
- package/package.json +1 -1
- package/src/components/molecules/bonus-box/template-three/index.js +2 -17
- package/src/components/molecules/module/index.js +4 -0
- package/src/components/molecules/spotlights_v2/icon/index.js +19 -0
- package/src/components/molecules/spotlights_v2/icon/template-one/index.js +5 -0
- package/src/components/molecules/spotlights_v2/icon/template-one/template-one.module.scss +0 -0
- package/src/components/molecules/spotlights_v2/icon/template-one/template-one.stories.js +36 -0
- package/src/components/molecules/spotlights_v2/icon/template-one/template-one.test.js +12 -0
- package/src/components/molecules/spotlights_v2/image/index.js +19 -0
- package/src/components/molecules/spotlights_v2/image/template-one/index.js +5 -0
- package/src/components/molecules/spotlights_v2/image/template-one/template-one.module.scss +0 -0
- package/src/components/molecules/spotlights_v2/image/template-one/template-one.stories.js +36 -0
- package/src/components/molecules/spotlights_v2/image/template-one/template-one.test.js +12 -0
- package/src/components/molecules/spotlights_v2/image-text/index.js +19 -0
- package/src/components/molecules/spotlights_v2/image-text/template-one/index.js +5 -0
- package/src/components/molecules/spotlights_v2/image-text/template-one/template-one.module.scss +0 -0
- package/src/components/molecules/spotlights_v2/image-text/template-one/template-one.stories.js +36 -0
- package/src/components/molecules/spotlights_v2/image-text/template-one/template-one.test.js +12 -0
- package/src/components/molecules/spotlights_v2/index.js +21 -0
- package/src/constants/pick-keys.mjs +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## [30.0.32](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v30.0.31...v30.0.32) (2023-12-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add new spotlight structure ([f1cae24](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f1cae24be4dc8acd2acfb1f6581bf1a9f328410a))
|
|
7
|
+
* chane name on storybook ([6c9f6e1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6c9f6e11dc464eae70f229ac7302d06af4236f75))
|
|
8
|
+
* remove changes for carousel on this branch ([e61acd7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/e61acd781632ff8ba8053cd22fc620a5851a1bf1))
|
|
9
|
+
* removed icon from bonus box ([ca998f0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/ca998f013a3fd86c04944197d018881bff81d6fb))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Code Refactoring
|
|
13
|
+
|
|
14
|
+
* add payout times for toplist ([b1c2416](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/b1c2416d30527fd6bd4ab9a2029c47f7ef6f964f))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
* Merge branch 'tm-3858-spotlights' into 'master' ([3b6fcb1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/3b6fcb1878fdc8217d1f2f956657373c80da8332))
|
|
18
|
+
* Merge branch 'tm-3788-toplist-payout-time' into 'master' ([0774acb](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/0774acb277362bfdc048b774bcb078d71237a322))
|
|
19
|
+
|
|
1
20
|
## [30.0.31](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v30.0.30...v30.0.31) (2023-12-05)
|
|
2
21
|
|
|
3
22
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { FaArrowRight } from '@react-icons/all-files/fa/FaArrowRight';
|
|
4
3
|
import { translate, prettyTracker, getBonusData } from '~helpers/getters.mjs';
|
|
5
4
|
import { Context } from '~context/MainProvider';
|
|
6
5
|
import CtaButton from '../../../atoms/button/operator-cta';
|
|
@@ -49,26 +48,12 @@ export default function BonusBox({
|
|
|
49
48
|
{!showVariablesComponent ? (
|
|
50
49
|
<>
|
|
51
50
|
{content()}
|
|
52
|
-
{ctaBtn &&
|
|
53
|
-
<CtaButton
|
|
54
|
-
operator={item}
|
|
55
|
-
icon={<FaArrowRight title="Right-pointing Arrow Icon" />}
|
|
56
|
-
buttonType={buttonType}
|
|
57
|
-
module={module}
|
|
58
|
-
/>
|
|
59
|
-
)}
|
|
51
|
+
{ctaBtn && <CtaButton operator={item} buttonType={buttonType} module={module} />}
|
|
60
52
|
</>
|
|
61
53
|
) : (
|
|
62
54
|
<div>
|
|
63
55
|
{content()}
|
|
64
|
-
{ctaBtn &&
|
|
65
|
-
<CtaButton
|
|
66
|
-
operator={item}
|
|
67
|
-
icon={<FaArrowRight title="Right-pointing Arrow Icon" />}
|
|
68
|
-
buttonType={buttonType}
|
|
69
|
-
module={module}
|
|
70
|
-
/>
|
|
71
|
-
)}
|
|
56
|
+
{ctaBtn && <CtaButton operator={item} buttonType={buttonType} module={module} />}
|
|
72
57
|
{showVariablesComponent && variableInsideContainer && <VariableComponent item={item} />}
|
|
73
58
|
</div>
|
|
74
59
|
)}
|
|
@@ -57,7 +57,11 @@ const Modules = ({ module, page, pageContext }) => {
|
|
|
57
57
|
case 'image':
|
|
58
58
|
return loadable(() => import('~atoms/image'));
|
|
59
59
|
case 'spotlights':
|
|
60
|
+
if (process.env.ENABLE_SPOTLIGHT_V2) {
|
|
61
|
+
return loadable(() => import('~molecules/spotlights_v2'));
|
|
62
|
+
}
|
|
60
63
|
return loadable(() => import('~atoms/spotlights'));
|
|
64
|
+
|
|
61
65
|
default:
|
|
62
66
|
return null;
|
|
63
67
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* eslint-disable no-case-declarations */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import loadable from '@loadable/component';
|
|
4
|
+
|
|
5
|
+
export default function index({ module }) {
|
|
6
|
+
// Note: Default is template one when you create a new template just follow the stucture please
|
|
7
|
+
const Component = () => {
|
|
8
|
+
switch (module?.style) {
|
|
9
|
+
// case 'template_two':
|
|
10
|
+
// const TempateTwo = loadable(() => import('./template-two'));
|
|
11
|
+
// return <TempateTwo module={module} />;
|
|
12
|
+
default:
|
|
13
|
+
const TempateOne = loadable(() => import('./template-one'));
|
|
14
|
+
return <TempateOne module={module} />;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
return <>{Component && <Component />}</>;
|
|
19
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
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 TemplateOne from '.';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
title: 'Theme/Modules/Spotlight/Icon/Template One',
|
|
14
|
+
component: TemplateOne,
|
|
15
|
+
argTypes: {},
|
|
16
|
+
parameters: {
|
|
17
|
+
docs: {
|
|
18
|
+
description: {
|
|
19
|
+
component: 'A component that shows a list of pros and cons and corresponding icons.',
|
|
20
|
+
},
|
|
21
|
+
page: () => (
|
|
22
|
+
<>
|
|
23
|
+
<Title />
|
|
24
|
+
<Description />
|
|
25
|
+
<Primary />
|
|
26
|
+
<ArgsTable story={PRIMARY_STORY} />
|
|
27
|
+
</>
|
|
28
|
+
),
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const Template = (args) => <TemplateOne {...args} />;
|
|
34
|
+
|
|
35
|
+
export const Default = Template.bind({});
|
|
36
|
+
Default.args = {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom/extend-expect';
|
|
4
|
+
|
|
5
|
+
import TempateOne from '.';
|
|
6
|
+
|
|
7
|
+
describe('TempateOne Component', () => {
|
|
8
|
+
test('render with props', () => {
|
|
9
|
+
// eslint-disable-next-line no-unused-vars
|
|
10
|
+
const { container } = render(<TempateOne />);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* eslint-disable no-case-declarations */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import loadable from '@loadable/component';
|
|
4
|
+
|
|
5
|
+
export default function index({ module }) {
|
|
6
|
+
// Note: Default is template one when you create a new template just follow the stucture please
|
|
7
|
+
const Component = () => {
|
|
8
|
+
switch (module?.style) {
|
|
9
|
+
// case 'template_two':
|
|
10
|
+
// const TempateTwo = loadable(() => import('./template-two'));
|
|
11
|
+
// return <TempateTwo module={module} />;
|
|
12
|
+
default:
|
|
13
|
+
const TempateOne = loadable(() => import('./template-one'));
|
|
14
|
+
return <TempateOne module={module} />;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
return <>{Component && <Component />}</>;
|
|
19
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
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 TemplateOne from '.';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
title: 'Theme/Modules/Spotlight/Image/Template One',
|
|
14
|
+
component: TemplateOne,
|
|
15
|
+
argTypes: {},
|
|
16
|
+
parameters: {
|
|
17
|
+
docs: {
|
|
18
|
+
description: {
|
|
19
|
+
component: 'A component that shows a list of pros and cons and corresponding icons.',
|
|
20
|
+
},
|
|
21
|
+
page: () => (
|
|
22
|
+
<>
|
|
23
|
+
<Title />
|
|
24
|
+
<Description />
|
|
25
|
+
<Primary />
|
|
26
|
+
<ArgsTable story={PRIMARY_STORY} />
|
|
27
|
+
</>
|
|
28
|
+
),
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const Template = (args) => <TemplateOne {...args} />;
|
|
34
|
+
|
|
35
|
+
export const Default = Template.bind({});
|
|
36
|
+
Default.args = {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom/extend-expect';
|
|
4
|
+
|
|
5
|
+
import TempateOne from '.';
|
|
6
|
+
|
|
7
|
+
describe('TempateOne Component', () => {
|
|
8
|
+
test('render with props', () => {
|
|
9
|
+
// eslint-disable-next-line no-unused-vars
|
|
10
|
+
const { container } = render(<TempateOne />);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* eslint-disable no-case-declarations */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import loadable from '@loadable/component';
|
|
4
|
+
|
|
5
|
+
export default function index({ module }) {
|
|
6
|
+
// Note: Default is template one when you create a new template just follow the stucture please
|
|
7
|
+
const Component = () => {
|
|
8
|
+
switch (module?.style) {
|
|
9
|
+
// case 'template_two':
|
|
10
|
+
// const TempateTwo = loadable(() => import('./template-two'));
|
|
11
|
+
// return <TempateTwo module={module} />;
|
|
12
|
+
default:
|
|
13
|
+
const TempateOne = loadable(() => import('./template-one'));
|
|
14
|
+
return <TempateOne module={module} />;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
return <>{Component && <Component />}</>;
|
|
19
|
+
}
|
package/src/components/molecules/spotlights_v2/image-text/template-one/template-one.module.scss
ADDED
|
File without changes
|
package/src/components/molecules/spotlights_v2/image-text/template-one/template-one.stories.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
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 TemplateOne from '.';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
title: 'Theme/Modules/Spotlight/Image Text/Template One',
|
|
14
|
+
component: TemplateOne,
|
|
15
|
+
argTypes: {},
|
|
16
|
+
parameters: {
|
|
17
|
+
docs: {
|
|
18
|
+
description: {
|
|
19
|
+
component: 'A component that shows a list of pros and cons and corresponding icons.',
|
|
20
|
+
},
|
|
21
|
+
page: () => (
|
|
22
|
+
<>
|
|
23
|
+
<Title />
|
|
24
|
+
<Description />
|
|
25
|
+
<Primary />
|
|
26
|
+
<ArgsTable story={PRIMARY_STORY} />
|
|
27
|
+
</>
|
|
28
|
+
),
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const Template = (args) => <TemplateOne {...args} />;
|
|
34
|
+
|
|
35
|
+
export const Default = Template.bind({});
|
|
36
|
+
Default.args = {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom/extend-expect';
|
|
4
|
+
|
|
5
|
+
import TempateOne from '.';
|
|
6
|
+
|
|
7
|
+
describe('TempateOne Component', () => {
|
|
8
|
+
test('render with props', () => {
|
|
9
|
+
// eslint-disable-next-line no-unused-vars
|
|
10
|
+
const { container } = render(<TempateOne />);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* eslint-disable no-case-declarations */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import loadable from '@loadable/component';
|
|
4
|
+
|
|
5
|
+
export default function index({ module }) {
|
|
6
|
+
const Component = () => {
|
|
7
|
+
switch (module?.mode) {
|
|
8
|
+
case 'image_text':
|
|
9
|
+
const ImageWithText = loadable(() => import('./image-text'));
|
|
10
|
+
return <ImageWithText module={module} />;
|
|
11
|
+
case 'icon':
|
|
12
|
+
const Icon = loadable(() => import('./icon'));
|
|
13
|
+
return <Icon module={module} />;
|
|
14
|
+
default:
|
|
15
|
+
const Image = loadable(() => import('./image'));
|
|
16
|
+
return <Image module={module} />;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
return <>{Component && <Component />}</>;
|
|
21
|
+
}
|