@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.
- package/Layout/Screen.tsx +14 -12
- 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
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
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;
|