oddsgate-ds 1.0.85 → 1.0.87
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/.babelrc.json +10 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/ImageWrapper/ImageWrapper.theme.ts +1 -2
- package/src/components/molecules/IconBox/IconBox.theme.ts +1 -1
- package/src/components/molecules/ProductCard/ProductCard.component.tsx +13 -5
- package/src/components/molecules/ProductCard/ProductCard.theme.ts +2 -2
- package/src/components/molecules/ShareModal/ShareModal.theme.ts +1 -1
- package/src/components/organisms/CircularSlider/CircularSlider.component.tsx +1 -1
- package/src/components/organisms/Tabs/Tabs.theme.ts +1 -1
- package/src/helpers/clickOutsideToClose.tsx +1 -1
- package/src/helpers/useInterval.ts +0 -1
package/package.json
CHANGED
|
@@ -3,7 +3,6 @@ import { css, styled } from 'styled-components';
|
|
|
3
3
|
import { IImageWrapper } from './ImageWrapper.interface';
|
|
4
4
|
|
|
5
5
|
export const StyledImageWrapper = styled.picture<IImageWrapper>`
|
|
6
|
-
|
|
7
6
|
& picture{
|
|
8
7
|
position: relative;
|
|
9
8
|
}
|
|
@@ -48,4 +47,4 @@ export const Overlay = styled.div`
|
|
|
48
47
|
bottom: 0;
|
|
49
48
|
left: 0;
|
|
50
49
|
right: 0;
|
|
51
|
-
`
|
|
50
|
+
`
|
|
@@ -18,12 +18,20 @@ const ProductCard = ({
|
|
|
18
18
|
const parts = title ? title.split(" ") : [];
|
|
19
19
|
const half = parts ? parts.length / 2 : 0;
|
|
20
20
|
|
|
21
|
-
const firstRowTitle = Array.prototype.join.call({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}, " ");
|
|
21
|
+
// const firstRowTitle = Array.prototype.join.call({
|
|
22
|
+
// ...parts,
|
|
23
|
+
// length: half,
|
|
24
|
+
// }, " ");
|
|
25
|
+
let firstRowTitle;
|
|
26
|
+
let secondRowTitle;
|
|
27
|
+
|
|
28
|
+
if(parts.length>1){
|
|
29
|
+
firstRowTitle = parts.slice(0, half).join(" ")
|
|
30
|
+
secondRowTitle = parts.slice(half, parts?.length).join(" ")
|
|
31
|
+
}else{
|
|
32
|
+
firstRowTitle = title;
|
|
33
|
+
}
|
|
25
34
|
|
|
26
|
-
const secondRowTitle = parts.slice(half, parts?.length).join(" ")
|
|
27
35
|
|
|
28
36
|
return (
|
|
29
37
|
<StyledProductCard className={className} style={style}>
|
|
@@ -17,8 +17,8 @@ export const StyledProductCardWrapper = styled.div<IProductCard>`
|
|
|
17
17
|
display:flex;
|
|
18
18
|
flex-flow:column;
|
|
19
19
|
align-items: center;
|
|
20
|
-
gap:
|
|
20
|
+
gap: 1.5rem;
|
|
21
21
|
background-color: ${colors.primary50};
|
|
22
|
-
padding:
|
|
22
|
+
padding: 3rem 2rem;
|
|
23
23
|
border-radius: 0 ${radius.lg};
|
|
24
24
|
`;
|
|
@@ -149,7 +149,7 @@ const CircularSlider = ({
|
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
for (let i = 0; i < slides.length; i++) {
|
|
152
|
-
slides[i].addEventListener('click', rotateSlider);
|
|
152
|
+
slides[i].addEventListener('click', rotateSlider, {passive: true});
|
|
153
153
|
};
|
|
154
154
|
|
|
155
155
|
window.addEventListener('resize', sliderResize)
|
|
@@ -18,7 +18,7 @@ export const StyledTabsLinks = styled.a<ITabsItem>`
|
|
|
18
18
|
width: 100%;
|
|
19
19
|
color: ${colors.secondary50};
|
|
20
20
|
background-color: ${colors.third10};
|
|
21
|
-
padding: 8px
|
|
21
|
+
padding: 8px 26px;
|
|
22
22
|
border-radius: 50px;
|
|
23
23
|
transition: all 0.3s linear;
|
|
24
24
|
cursor: pointer;
|
|
@@ -11,7 +11,7 @@ export default function clickOutSideToClose(
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
useEffect(() => {
|
|
14
|
-
document.addEventListener('mouseup', handleClickOutside)
|
|
14
|
+
document.addEventListener('mouseup', handleClickOutside, {passive: true})
|
|
15
15
|
return () => document.removeEventListener('mouseup', handleClickOutside)
|
|
16
16
|
}, [ref])
|
|
17
17
|
}
|
|
@@ -10,7 +10,6 @@ export const useInterval = (callback, delay) => {
|
|
|
10
10
|
|
|
11
11
|
useEffect(() => {
|
|
12
12
|
function tick() {
|
|
13
|
-
console.log("tou2");
|
|
14
13
|
if (savedCallback && savedCallback.current) {
|
|
15
14
|
const result = (savedCallback as unknown as any).current();
|
|
16
15
|
if (result === true) {// if callback returs true, clear timeout;
|