@momo-kits/foundation 0.161.2-beta.7 → 0.161.2-beta.9

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.
@@ -37,7 +37,8 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
37
37
  const action = useRef<undefined | string>(undefined);
38
38
  const insets = useSafeAreaInsets();
39
39
  const heightHeader = useHeaderHeight();
40
- const keyboardOffset = heightHeader - Math.min(insets.bottom, 21);
40
+ const bottomInset = Platform.OS === 'ios' ? Math.min(insets.bottom, 21) : insets.bottom;
41
+ const keyboardOffset = heightHeader - bottomInset;
41
42
 
42
43
  const showBaseLineDebug = context?.features?.showBaseLineDebug ?? false;
43
44
 
@@ -311,7 +312,7 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
311
312
  {useBottomInset && (
312
313
  <View
313
314
  style={{
314
- height: Math.min(insets.bottom, 21),
315
+ height: bottomInset,
315
316
  backgroundColor: backgroundColor,
316
317
  }}
317
318
  />
@@ -296,7 +296,7 @@ const BottomTab: React.FC<BottomTabProps> = ({
296
296
  activeTintColor={theme.colors.primary}
297
297
  style={[
298
298
  {
299
- height: 64 + Math.min(insets.bottom, 21),
299
+ height: 64 + (Platform.OS === 'ios' ? Math.min(insets.bottom, 21) : insets.bottom),
300
300
  },
301
301
  ]}
302
302
  />
package/Layout/Screen.tsx CHANGED
@@ -209,9 +209,10 @@ const Screen = forwardRef(
209
209
  let handleScroll: any;
210
210
  let Component: any = View;
211
211
 
212
- let keyboardOffset = heightHeader - Math.min(insets.bottom, 21);
212
+ const bottomInset = Platform.OS === 'ios' ? Math.min(insets.bottom, 21) : insets.bottom;
213
+ let keyboardOffset = heightHeader - bottomInset;
213
214
  if (headerType === 'extended' || animatedHeader || inputSearchProps) {
214
- keyboardOffset = -Math.min(insets.bottom, 21);
215
+ keyboardOffset = -bottomInset;
215
216
  }
216
217
 
217
218
  /**
@@ -620,7 +621,7 @@ const Screen = forwardRef(
620
621
  {...floatingButtonProps}
621
622
  animatedValue={animatedValue}
622
623
  bottom={
623
- Footer || isTab ? 12 : Math.min(insets.bottom, 21) + Spacing.S
624
+ Footer || isTab ? 12 : bottomInset + Spacing.S
624
625
  }
625
626
  />
626
627
  </View>
@@ -631,7 +632,7 @@ const Screen = forwardRef(
631
632
  style={[
632
633
  styles.shadow,
633
634
  {
634
- paddingBottom: Math.min(insets.bottom, 21) + Spacing.S,
635
+ paddingBottom: bottomInset + Spacing.S,
635
636
  backgroundColor: theme.colors.background.surface,
636
637
  },
637
638
  ]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.161.2-beta.7",
3
+ "version": "0.161.2-beta.9",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},