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

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.
@@ -171,8 +171,8 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
171
171
  style={[
172
172
  styles.sheetContainer,
173
173
  {
174
- backgroundColor,
175
- paddingBottom: Math.min(insets.bottom, 20) + Spacing.S,
174
+ backgroundColor: props?.indicatorColor ?? backgroundColor,
175
+ paddingBottom: Math.min(insets.bottom, 20),
176
176
  },
177
177
  ]}>
178
178
  <View style={styles.indicatorContainer}>
@@ -119,6 +119,7 @@ export interface BottomSheetParams extends ScreenParams {
119
119
  [key: string]: any;
120
120
  onDismiss?: () => void;
121
121
  snapPoint?: '30%' | '50%' | '70%' | '90%' | 'content';
122
+ indicatorColor?: string;
122
123
  }
123
124
 
124
125
  export type NavigationButtonProps = {
package/Layout/Screen.tsx CHANGED
@@ -12,6 +12,7 @@ import {useHeaderHeight} from '@react-navigation/stack';
12
12
  import {useSafeAreaInsets} from 'react-native-safe-area-context';
13
13
  import React, {
14
14
  forwardRef,
15
+ Fragment,
15
16
  ReactNode,
16
17
  useContext,
17
18
  useEffect,
@@ -259,11 +260,14 @@ const Screen = forwardRef(
259
260
  /**
260
261
  * build content for screen
261
262
  */
262
- const renderContent = () => {
263
+ const renderContent = (children: any): any => {
263
264
  const results = validateChildren(children, [Section, Card, undefined]);
264
265
  if (Array.isArray(results)) {
265
266
  return results.map((item, index) => {
266
267
  const space = item?.props?.useMargin === false ? 0 : Spacing.M;
268
+ if (item?.type == Fragment) {
269
+ return renderContent(item?.props?.children);
270
+ }
267
271
  if (item) {
268
272
  return (
269
273
  <View
@@ -280,6 +284,9 @@ const Screen = forwardRef(
280
284
  } else {
281
285
  const item: any = children;
282
286
  const space = item?.props?.useMargin === false ? 0 : Spacing.M;
287
+ if (item?.type == Fragment) {
288
+ return renderContent(item?.props?.children);
289
+ }
283
290
  return (
284
291
  <View
285
292
  key={`ScreenItem`}
@@ -328,7 +335,7 @@ const Screen = forwardRef(
328
335
  style={[styles.screenBanner, {maxHeight: 210 + layoutOffset}]}>
329
336
  {renderHeader()}
330
337
  </View>
331
- {renderContent()}
338
+ {renderContent(children)}
332
339
  </Component>
333
340
  {Footer && (
334
341
  <View
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.81.36-beta.2",
3
+ "version": "0.81.36-beta.4",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {