@momo-kits/foundation 0.81.36-beta.1 → 0.81.36-beta.2

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.
Files changed (2) hide show
  1. package/Layout/Screen.tsx +14 -12
  2. package/package.json +1 -1
package/Layout/Screen.tsx CHANGED
@@ -260,20 +260,22 @@ const Screen = forwardRef(
260
260
  * build content for screen
261
261
  */
262
262
  const renderContent = () => {
263
- const results = validateChildren(children, [Section, Card]);
263
+ const results = validateChildren(children, [Section, Card, undefined]);
264
264
  if (Array.isArray(results)) {
265
265
  return results.map((item, index) => {
266
- const space = item.props?.useMargin === false ? 0 : Spacing.M;
267
- return (
268
- <View
269
- key={`ScreenItem${index}`}
270
- style={{
271
- marginTop: space,
272
- flex: item.props?.expanded ? 1 : undefined,
273
- }}>
274
- {item}
275
- </View>
276
- );
266
+ const space = item?.props?.useMargin === false ? 0 : Spacing.M;
267
+ if (item) {
268
+ return (
269
+ <View
270
+ key={`ScreenItem${index}`}
271
+ style={{
272
+ marginTop: space,
273
+ flex: item.props?.expanded ? 1 : undefined,
274
+ }}>
275
+ {item}
276
+ </View>
277
+ );
278
+ }
277
279
  });
278
280
  } else {
279
281
  const item: any = children;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.81.36-beta.1",
3
+ "version": "0.81.36-beta.2",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {