Skip to content

Commit b2f4b25

Browse files
committed
chore: fix integration test scroll issue
1 parent 8e76b64 commit b2f4b25

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

example/src/helpers/overlayModal.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ interface OverlayModalProps {
2323
closeOverlay: () => void;
2424
children: ReactNode;
2525
height?: number;
26+
contentPaddingBottom?: number;
2627
}
2728

2829
const OverlayModal: React.FC<OverlayModalProps> = ({
2930
visible,
3031
closeOverlay,
3132
children,
3233
height: height,
34+
contentPaddingBottom = 20,
3335
}) => {
3436
const modalContentStyle = [
3537
styles.modalContent,
@@ -51,9 +53,9 @@ const OverlayModal: React.FC<OverlayModalProps> = ({
5153
showsVerticalScrollIndicator={true}
5254
persistentScrollbar={true}
5355
style={styles.scrollContainer}
54-
contentContainerStyle={styles.scrollContentContainer}
56+
contentContainerStyle={{ paddingBottom: contentPaddingBottom }}
5557
>
56-
<View style={styles.scrollContent}>{children}</View>
58+
{children}
5759
</ScrollView>
5860
<View style={styles.closeButtonContainer}>
5961
<ExampleAppButton
@@ -94,10 +96,6 @@ const styles = StyleSheet.create({
9496
scrollContainer: {
9597
flex: 1,
9698
},
97-
scrollContentContainer: {
98-
paddingBottom: 20,
99-
},
100-
scrollContent: {},
10199
closeButtonContainer: {
102100
marginTop: 8,
103101
shadowColor: '#000',

example/src/screens/IntegrationTestsScreen.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ const IntegrationTestsScreen = () => {
367367
setIsOverlayOpen(false);
368368
}}
369369
height={overlayMinHeight}
370+
contentPaddingBottom={500}
370371
>
371372
<ExampleAppButton
372373
title="testNavigationSessionInitialization"

0 commit comments

Comments
 (0)