@momo-kits/foundation 0.161.2-beta.13 → 0.161.2-beta.15
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
|
|
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:
|
|
315
|
+
height: bottomInset,
|
|
315
316
|
backgroundColor: backgroundColor,
|
|
316
317
|
}}
|
|
317
318
|
/>
|
|
@@ -320,7 +320,7 @@ const BottomTab: React.FC<BottomTabProps> = ({
|
|
|
320
320
|
activeTintColor={theme.colors.primary}
|
|
321
321
|
style={[
|
|
322
322
|
{
|
|
323
|
-
height: 64 + Math.min(insets.bottom, 21),
|
|
323
|
+
height: 64 + (Platform.OS === 'ios' ? Math.min(insets.bottom, 21) : insets.bottom),
|
|
324
324
|
},
|
|
325
325
|
]}
|
|
326
326
|
/>
|
package/Layout/Screen.tsx
CHANGED
|
@@ -204,9 +204,10 @@ const Screen = forwardRef(
|
|
|
204
204
|
let handleScroll;
|
|
205
205
|
let Component: any = View;
|
|
206
206
|
|
|
207
|
-
|
|
207
|
+
const bottomInset = Platform.OS === 'ios' ? Math.min(insets.bottom, 21) : insets.bottom;
|
|
208
|
+
let keyboardOffset = heightHeader - bottomInset;
|
|
208
209
|
if (headerType === 'extended' || animatedHeader || inputSearchProps) {
|
|
209
|
-
keyboardOffset = -
|
|
210
|
+
keyboardOffset = -bottomInset;
|
|
210
211
|
}
|
|
211
212
|
|
|
212
213
|
/**
|
|
@@ -616,7 +617,7 @@ const Screen = forwardRef(
|
|
|
616
617
|
{...floatingButtonProps}
|
|
617
618
|
animatedValue={animatedValue.current}
|
|
618
619
|
bottom={
|
|
619
|
-
Footer || isTab ? 12 :
|
|
620
|
+
Footer || isTab ? 12 : bottomInset + Spacing.S
|
|
620
621
|
}
|
|
621
622
|
/>
|
|
622
623
|
</View>
|
|
@@ -627,7 +628,7 @@ const Screen = forwardRef(
|
|
|
627
628
|
style={[
|
|
628
629
|
styles.shadow,
|
|
629
630
|
{
|
|
630
|
-
paddingBottom:
|
|
631
|
+
paddingBottom: bottomInset + Spacing.S,
|
|
631
632
|
backgroundColor: theme.colors.background.surface,
|
|
632
633
|
},
|
|
633
634
|
]}
|