@meduza/ui-kit-2 0.1.29 → 0.1.31
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/ui-kit-2.cjs.development.js +3 -3
- package/dist/ui-kit-2.cjs.development.js.map +1 -1
- package/dist/ui-kit-2.cjs.production.min.js +1 -1
- package/dist/ui-kit-2.cjs.production.min.js.map +1 -1
- package/dist/ui-kit-2.esm.js +3 -3
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit.css +585 -585
- package/package.json +1 -1
- package/src/RelatedRichBlock/index.tsx +6 -4
package/package.json
CHANGED
|
@@ -37,8 +37,7 @@ export const RelatedRichBlock: React.FC<RelatedRichBlockProps> = ({
|
|
|
37
37
|
const cardType = `is${toCapitalize(layout)}`
|
|
38
38
|
|
|
39
39
|
useEffect(() => {
|
|
40
|
-
|
|
41
|
-
setType('richRelated')
|
|
40
|
+
setType(Math.random() >= 0.5 ? 'simpleRelated' : 'richRelated')
|
|
42
41
|
}, [])
|
|
43
42
|
|
|
44
43
|
const [ref, inView] = useInView({
|
|
@@ -87,7 +86,6 @@ export const RelatedRichBlock: React.FC<RelatedRichBlockProps> = ({
|
|
|
87
86
|
classNames = makeStyleContext(classNames, theme, styles)
|
|
88
87
|
|
|
89
88
|
if (onlyOn === 'desktop') {
|
|
90
|
-
|
|
91
89
|
style.backgroundImage = generateGradient(
|
|
92
90
|
gradients.bg_rgb,
|
|
93
91
|
'mediaBlockBottom'
|
|
@@ -102,7 +100,11 @@ export const RelatedRichBlock: React.FC<RelatedRichBlockProps> = ({
|
|
|
102
100
|
if (type === 'simpleRelated') {
|
|
103
101
|
return (
|
|
104
102
|
<div ref={ref} className={styles.wrapper}>
|
|
105
|
-
<RelatedBlock
|
|
103
|
+
<RelatedBlock
|
|
104
|
+
block={fallback}
|
|
105
|
+
trackClick={true}
|
|
106
|
+
styleContext={styleContext}
|
|
107
|
+
/>
|
|
106
108
|
</div>
|
|
107
109
|
)
|
|
108
110
|
}
|