@momo-kits/foundation 0.81.2 → 0.81.3

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.
@@ -24,14 +24,16 @@ const ItemList: FC<FlatListProps<any>> = ({
24
24
  console.warn('Wrong children type for this component, expected are Item');
25
25
  }
26
26
 
27
- const spacingStyle =
28
- numColumns > 1
29
- ? {
27
+ return (
28
+ <View
29
+ style={
30
+ numColumns > 1 && {
30
31
  marginRight: gutterSize,
31
32
  }
32
- : {};
33
-
34
- return <View style={spacingStyle}>{children}</View>;
33
+ }>
34
+ {children}
35
+ </View>
36
+ );
35
37
  };
36
38
 
37
39
  return (
package/Layout/types.ts CHANGED
@@ -1,5 +1,3 @@
1
- import {FlatListProps} from 'react-native';
2
-
3
1
  export type GridContextProps = {
4
2
  /**
5
3
  * Represents the number of columns in the grid.
package/Layout/utils.ts CHANGED
@@ -8,7 +8,7 @@ import React, {Fragment, ReactElement, useEffect, useState} from 'react';
8
8
  */
9
9
  const validateChildren = (
10
10
  children: React.ReactNode | React.ReactNode[],
11
- childrenTypes: Array<React.FC>,
11
+ childrenTypes: Array<React.ReactNode>,
12
12
  ) => {
13
13
  const validateType = (child: React.ReactElement) => {
14
14
  const valid = childrenTypes.some(
@@ -17,7 +17,7 @@ const validateChildren = (
17
17
  if (!valid) {
18
18
  console.warn(
19
19
  `Wrong children type for this component, expected are ${childrenTypes
20
- .map(type => type.displayName)
20
+ .map(item => item)
21
21
  .join(', ')}.`,
22
22
  );
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.81.2",
3
+ "version": "0.81.3",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {