gatsby-matrix-theme 35.0.2 → 35.0.4
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/main.js +5 -2
- package/.storybook/preview.js +8 -0
- package/CHANGELOG.md +18 -0
- package/package.json +2 -2
- package/src/components/atoms/coupon/index.js +12 -6
- package/storybook/public/{970.45afd955.iframe.bundle.js → 487.3b92b087.iframe.bundle.js} +4 -4
- package/storybook/public/{970.45afd955.iframe.bundle.js.map → 487.3b92b087.iframe.bundle.js.map} +1 -1
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.f4c939a0.iframe.bundle.js +2 -0
- package/storybook/public/main.5f8bd0f3.iframe.bundle.js +0 -2
- /package/storybook/public/{970.45afd955.iframe.bundle.js.LICENSE.txt → 487.3b92b087.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/public/{main.5f8bd0f3.iframe.bundle.js.LICENSE.txt → main.f4c939a0.iframe.bundle.js.LICENSE.txt} +0 -0
package/.storybook/main.js
CHANGED
|
@@ -10,10 +10,13 @@ module.exports = {
|
|
|
10
10
|
'../../node_modules/gatsby-core-theme/src/components/organisms/anchor/anchor.stories.js',
|
|
11
11
|
'../../node_modules/gatsby-core-theme/src/components/molecules/bonus/template-one/bonus.stories.js',
|
|
12
12
|
'../../node_modules/gatsby-core-theme/src/components/molecules/bonus/template-two/bonus.stories.js',
|
|
13
|
+
'../../node_modules/gatsby-core-theme/src/components/molecules/content/text.stories.js',
|
|
14
|
+
'../../node_modules/gatsby-core-theme/src/components/molecules/content/show-more.stories.js',
|
|
13
15
|
'../../node_modules/gatsby-core-theme/src/components/molecules/content/content.stories.js',
|
|
14
|
-
'../../node_modules/gatsby-core-theme/src/components/molecules/content/table/table.stories.js',
|
|
15
|
-
'../../node_modules/gatsby-core-theme/src/components/molecules/content/text/Images/text.stories.js',
|
|
16
16
|
'../../node_modules/gatsby-core-theme/src/components/molecules/content/lists/lists.stories.js',
|
|
17
|
+
'../../node_modules/gatsby-core-theme/src/components/molecules/content/frame/frame.stories.js',
|
|
18
|
+
'../../node_modules/gatsby-core-theme/src/components/molecules/content/table/table-one.stories.js',
|
|
19
|
+
'../../node_modules/gatsby-core-theme/src/components/molecules/content/table/table-two.stories.js',
|
|
17
20
|
'../../node_modules/gatsby-core-theme/src/components/molecules/pagination/pagination.stories.js',
|
|
18
21
|
],
|
|
19
22
|
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
|
package/.storybook/preview.js
CHANGED
|
@@ -53,6 +53,14 @@ export const parameters = {
|
|
|
53
53
|
'Payments',
|
|
54
54
|
['Template One', 'Template Two', 'Template Three'],
|
|
55
55
|
],
|
|
56
|
+
'Content',
|
|
57
|
+
[
|
|
58
|
+
'Common',
|
|
59
|
+
['Text and Images', ['Text', 'Show More Text', '*'], '*'],
|
|
60
|
+
'Template One',
|
|
61
|
+
'Template Two',
|
|
62
|
+
'Template Three',
|
|
63
|
+
],
|
|
56
64
|
],
|
|
57
65
|
'Atoms',
|
|
58
66
|
'Molecules',
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [35.0.4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v35.0.3...v35.0.4) (2023-11-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* content templates ([d101e50](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d101e50c5c2c35cf22cef6f1fe05641e840702de))
|
|
7
|
+
* no code style ([79f599f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/79f599f71b18e967ff354fa565d40443d2618bbd))
|
|
8
|
+
|
|
9
|
+
## [35.0.3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v35.0.2...v35.0.3) (2023-11-02)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* coupon logic ([ac929a5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ac929a5be5244a8d3b06e9201942c0b572c79591))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
* Merge branch 'tm-3743-coupon-logic' into 'master' ([ec7816f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ec7816f2e21828918d3014149b8b79bd4d5344c2))
|
|
18
|
+
|
|
1
19
|
## [35.0.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v35.0.1...v35.0.2) (2023-11-02)
|
|
2
20
|
|
|
3
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "35.0.
|
|
3
|
+
"version": "35.0.4",
|
|
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": "^5.11.0",
|
|
28
|
-
"gatsby-core-theme": "30.0.
|
|
28
|
+
"gatsby-core-theme": "30.0.12",
|
|
29
29
|
"gatsby-plugin-sharp": "^5.11.0",
|
|
30
30
|
"gatsby-plugin-sitemap": "^3.3.0",
|
|
31
31
|
"gatsby-transformer-sharp": "^5.11.0",
|
|
@@ -28,6 +28,8 @@ const Coupon = ({
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
const inactive = status === 'inactive';
|
|
32
|
+
|
|
31
33
|
return (
|
|
32
34
|
<div className={`${styles?.couponContainer || ''} ${!templateOne ? styles.templateTwo : ''}`}>
|
|
33
35
|
{!templateOne && showprefix && (
|
|
@@ -36,12 +38,14 @@ const Coupon = ({
|
|
|
36
38
|
</span>
|
|
37
39
|
)}
|
|
38
40
|
<button
|
|
39
|
-
onClick={() => (code !== null
|
|
41
|
+
onClick={() => (code !== null && !inactive ? copyToClipBoard(code) : '')}
|
|
40
42
|
type="button"
|
|
41
|
-
className={`${styles.coupon} ${copySuccess ? styles.copied : ''}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
className={`${styles.coupon} ${copySuccess ? styles.copied : ''}
|
|
44
|
+
${ code === null ? styles.noCode : ''}
|
|
45
|
+
${
|
|
46
|
+
inactive ? styles.disabled : ''
|
|
47
|
+
}`}
|
|
48
|
+
disabled={inactive}
|
|
45
49
|
>
|
|
46
50
|
{!copySuccess ? (
|
|
47
51
|
<>
|
|
@@ -51,7 +55,9 @@ const Coupon = ({
|
|
|
51
55
|
</span>
|
|
52
56
|
)}
|
|
53
57
|
{code || translate(translations, 'no_coupon_available', 'Not Needed')}
|
|
54
|
-
{showIcon &&
|
|
58
|
+
{showIcon && code !== null && !inactive && (
|
|
59
|
+
<img src={icon} alt="Copy Icon" width={22} height={22} />
|
|
60
|
+
)}
|
|
55
61
|
</>
|
|
56
62
|
) : (
|
|
57
63
|
<>
|