@nuskin/foundation-ui-components 1.30.0 → 1.30.1
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/package.json
CHANGED
|
@@ -45,6 +45,7 @@ const CardContainer = styled(Box)(() => {
|
|
|
45
45
|
'-webkit-line-clamp': '1',
|
|
46
46
|
overflow: 'hidden',
|
|
47
47
|
textOverflow: 'ellipsis',
|
|
48
|
+
margin: 0,
|
|
48
49
|
},
|
|
49
50
|
'.body-text': {
|
|
50
51
|
fontSize: '12px',
|
|
@@ -55,6 +56,7 @@ const CardContainer = styled(Box)(() => {
|
|
|
55
56
|
overflow: 'hidden',
|
|
56
57
|
textOverflow: 'ellipsis',
|
|
57
58
|
color: '#8C8C8C',
|
|
59
|
+
margin: 0,
|
|
58
60
|
},
|
|
59
61
|
};
|
|
60
62
|
});
|
|
@@ -63,10 +65,14 @@ const NsPost = ({ text, body, backgroundImageDetail, className }: NsPostProps):
|
|
|
63
65
|
return (
|
|
64
66
|
<CardContainer className={className} data-testid="post-card">
|
|
65
67
|
<BynderMedia className="image" imageDetail={backgroundImageDetail} />
|
|
66
|
-
<
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
<article className="content">
|
|
69
|
+
<h2 className="body-title" title={text}>
|
|
70
|
+
{text}
|
|
71
|
+
</h2>
|
|
72
|
+
<p className="body-text" title={body?.substring(0, 80)}>
|
|
73
|
+
{body}
|
|
74
|
+
</p>
|
|
75
|
+
</article>
|
|
70
76
|
</CardContainer>
|
|
71
77
|
);
|
|
72
78
|
};
|
|
@@ -20,19 +20,20 @@ export const BynderMedia = ({ imageDetail, suffix, className, testId, liveTag }:
|
|
|
20
20
|
let transformedMediaUrl = getUrlBasedOnDerivative(mediaUrl, imageDerivativeType, suffix ?? '');
|
|
21
21
|
if (type === 'VIDEO') {
|
|
22
22
|
return (
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
<div {...liveTag}>
|
|
24
|
+
<video
|
|
25
|
+
loop
|
|
26
|
+
autoPlay
|
|
27
|
+
muted
|
|
28
|
+
width="100%"
|
|
29
|
+
style={{ backgroundColor: bgColor, objectFit: fit, objectPosition: position }}
|
|
30
|
+
className={`${className || ''} bynder-image`}
|
|
31
|
+
data-testid={testId || 'test-bynder-video'}
|
|
32
|
+
>
|
|
33
|
+
<source src={transformedMediaUrl} type="video/mp4" />
|
|
34
|
+
<source src={transformedMediaUrl} type="video/ogg" />
|
|
35
|
+
</video>
|
|
36
|
+
</div>
|
|
36
37
|
);
|
|
37
38
|
}
|
|
38
39
|
return (
|