gatsby-matrix-theme 3.2.24 → 3.2.25
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 +13 -0
- package/gatsby-config.js +1 -2
- package/package.json +1 -1
- package/src/components/molecules/faq/index.js +8 -8
- package/storybook/public/{5.7148fbb6.iframe.bundle.js → 5.f8a95893.iframe.bundle.js} +3 -3
- package/storybook/public/{5.7148fbb6.iframe.bundle.js.LICENSE.txt → 5.f8a95893.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/5.f8a95893.iframe.bundle.js.map +1 -0
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/{main.17fb3064.iframe.bundle.js → main.043a2c57.iframe.bundle.js} +1 -1
- package/storybook/public/{runtime~main.d4a6ad7e.iframe.bundle.js → runtime~main.3e464ba9.iframe.bundle.js} +1 -1
- package/storybook/public/{vendors~main.73d094d3.iframe.bundle.js → vendors~main.1f5a74cb.iframe.bundle.js} +3 -3
- package/storybook/public/{vendors~main.73d094d3.iframe.bundle.js.LICENSE.txt → vendors~main.1f5a74cb.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/vendors~main.1f5a74cb.iframe.bundle.js.map +1 -0
- package/storybook/public/5.7148fbb6.iframe.bundle.js.map +0 -1
- package/storybook/public/vendors~main.73d094d3.iframe.bundle.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [3.2.25](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.2.24...v3.2.25) (2022-02-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* clean up gatsby config ([5c2f4df](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5c2f4df24fce6888fe8222084c7d7c5cd7b1f9e5))
|
|
7
|
+
* fixed conflicts ([e2b84b8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e2b84b885e229e28ca9fc71c36fc728a854d5693))
|
|
8
|
+
* keep open FAQ when js is blocked ([230d1db](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/230d1db97e2fd99646ee63abab10473d204d1adc))
|
|
9
|
+
* return 70 coverage ([b14b876](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b14b876bba8ffbfd90fa27da95b5bdb2650dde3e))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* Merge branch 'tm-2697-Faq' into 'master' ([4615d58](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/4615d5853a2ef640834bbbdfc0ba019ed2987cb6))
|
|
13
|
+
|
|
1
14
|
## [3.2.24](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.2.23...v3.2.24) (2022-02-07)
|
|
2
15
|
|
|
3
16
|
|
package/gatsby-config.js
CHANGED
|
@@ -20,8 +20,7 @@ module.exports = {
|
|
|
20
20
|
'https://www.google-analytics.com',
|
|
21
21
|
'https://www.googletagmanager.com',
|
|
22
22
|
'https://gm.innocraft.cloud',
|
|
23
|
-
|
|
24
|
-
'https://d3449cb8ihm3k3.cloudfront.net',
|
|
23
|
+
process.env.IMAGE_CDN_URL,
|
|
25
24
|
],
|
|
26
25
|
},
|
|
27
26
|
},
|
package/package.json
CHANGED
|
@@ -7,15 +7,15 @@ import keygen from '~helpers/keygen';
|
|
|
7
7
|
|
|
8
8
|
/* eslint-disable react/no-danger */
|
|
9
9
|
|
|
10
|
-
const Faq = ({ module,
|
|
10
|
+
const Faq = ({ module, closeAll = false, openItem, closeOthers = false, icon = '' }) => {
|
|
11
11
|
const { items } = module;
|
|
12
12
|
const itemRefs = useRef([]);
|
|
13
13
|
const btnRefs = useRef([]);
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const closeAllItems = () => {
|
|
16
16
|
for (let i = 0; i < itemRefs.current.length; i += 1) {
|
|
17
|
-
itemRefs.current[i].classList.
|
|
18
|
-
btnRefs.current[i].classList.
|
|
17
|
+
itemRefs.current[i].classList.remove(styles.active);
|
|
18
|
+
btnRefs.current[i].classList.remove(styles.invertArrow);
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -45,8 +45,8 @@ const Faq = ({ module, openAll = true, openItem, closeOthers = false, icon = ''
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
useEffect(() => {
|
|
48
|
-
if (
|
|
49
|
-
|
|
48
|
+
if (closeAll) {
|
|
49
|
+
closeAllItems();
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
useEffect(() => {
|
|
@@ -72,7 +72,7 @@ const Faq = ({ module, openAll = true, openItem, closeOthers = false, icon = ''
|
|
|
72
72
|
</span>
|
|
73
73
|
</button>
|
|
74
74
|
<div
|
|
75
|
-
className={styles.content}
|
|
75
|
+
className={`${styles.content} ${styles.active}`}
|
|
76
76
|
ref={(el) => (itemRefs.current[index] = el)}
|
|
77
77
|
dangerouslySetInnerHTML={{ __html: item.answer }}
|
|
78
78
|
/>
|
|
@@ -93,7 +93,7 @@ Faq.propTypes = {
|
|
|
93
93
|
})
|
|
94
94
|
),
|
|
95
95
|
}).isRequired,
|
|
96
|
-
|
|
96
|
+
closeAll: PropTypes.bool,
|
|
97
97
|
openItem: PropTypes.number,
|
|
98
98
|
closeOthers: PropTypes.bool,
|
|
99
99
|
styles: PropTypes.shape({}),
|