oddsgate-ds 1.0.27 → 1.0.29
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/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/ProductCard/ProductCard.component.tsx +2 -2
- package/src/components/molecules/ProductCard/ProductCard.stories.tsx +5 -1
- package/src/components/molecules/ProductCard/ProductCard.theme.ts +2 -2
- package/src/components/organisms/CircularSlider/CircularSlider.component.tsx +4 -2
- package/src/components/organisms/CircularSlider/CircularSlider.theme.ts +1 -0
package/package.json
CHANGED
|
@@ -29,11 +29,11 @@ const ProductCard = ({
|
|
|
29
29
|
<StyledProductCard className={className} style={style}>
|
|
30
30
|
<StyledProductCardWrapper>
|
|
31
31
|
<Heading tag={'h3'} size={'h3'} className={'fw-bold'}>
|
|
32
|
-
{firstRowTitle}
|
|
32
|
+
{firstRowTitle}
|
|
33
33
|
</Heading>
|
|
34
34
|
{imageElement}
|
|
35
35
|
<Heading tag={'h3'} size={'h3'} className={'fw-bold'}>
|
|
36
|
-
{secondRowTitle}
|
|
36
|
+
{secondRowTitle}
|
|
37
37
|
</Heading>
|
|
38
38
|
</StyledProductCardWrapper>
|
|
39
39
|
{description && <RichText tag='p' className='color-secondary50 mt-4'>{description}</RichText>}
|
|
@@ -23,7 +23,11 @@ const image = (
|
|
|
23
23
|
)
|
|
24
24
|
|
|
25
25
|
export const Simple: StoryObj<IProductCard> = {
|
|
26
|
-
render: args =>
|
|
26
|
+
render: args =>
|
|
27
|
+
<>
|
|
28
|
+
<ProductCard {...args} title="Lorem" style={{ maxWidth: '320px' }}></ProductCard>
|
|
29
|
+
<ProductCard {...args} style={{ maxWidth: '320px' }}></ProductCard>
|
|
30
|
+
</>,
|
|
27
31
|
args: {
|
|
28
32
|
title: 'Cras vel facilisis tellus',
|
|
29
33
|
imageElement: image,
|
|
@@ -8,7 +8,7 @@ export const StyledProductCard = styled.div <IProductCard>`
|
|
|
8
8
|
|
|
9
9
|
& img{
|
|
10
10
|
width: 100%;
|
|
11
|
-
max-width:
|
|
11
|
+
max-width: 5rem;
|
|
12
12
|
object-fit: contain;
|
|
13
13
|
}
|
|
14
14
|
`;
|
|
@@ -20,5 +20,5 @@ export const StyledProductCardWrapper = styled.div<IProductCard>`
|
|
|
20
20
|
gap: 1rem;
|
|
21
21
|
background-color: ${colors.primary50};
|
|
22
22
|
padding: 2rem;
|
|
23
|
-
border-radius: ${radius.
|
|
23
|
+
border-radius: 0 ${radius.lg};
|
|
24
24
|
`;
|
|
@@ -85,10 +85,12 @@ const CircularSlider = ({
|
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
}
|
|
88
|
+
|
|
88
89
|
const sliderResize = () => {
|
|
90
|
+
console.log(slider?.current?.getBoundingClientRect().width);
|
|
89
91
|
let radius,
|
|
90
|
-
w = slider?.current?.getBoundingClientRect().width
|
|
91
|
-
h = slider?.current?.getBoundingClientRect().height
|
|
92
|
+
w = slider?.current ? slider?.current?.getBoundingClientRect().width : 0,
|
|
93
|
+
h = slider?.current ? slider?.current.getBoundingClientRect().height : 0;
|
|
92
94
|
|
|
93
95
|
2 * h <= w ? radius = h * sliderSize : radius = (w / 2) * sliderSize;
|
|
94
96
|
|