@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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.29",
2
+ "version": "0.1.31",
3
3
  "license": "MIT",
4
4
  "description": "UIKit for Meduza",
5
5
  "repository": "https://github.com/meduza-corp/ui-kit-2.git",
@@ -37,8 +37,7 @@ export const RelatedRichBlock: React.FC<RelatedRichBlockProps> = ({
37
37
  const cardType = `is${toCapitalize(layout)}`
38
38
 
39
39
  useEffect(() => {
40
- // setType(Math.random() >= 0.5 ? 'simpleRelated' : 'richRelated')
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 block={fallback} trackClick={true} />
103
+ <RelatedBlock
104
+ block={fallback}
105
+ trackClick={true}
106
+ styleContext={styleContext}
107
+ />
106
108
  </div>
107
109
  )
108
110
  }