Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Top padding safeAreaView inside Stack presentation modal #504

Open
andredewaard opened this issue Jun 14, 2024 · 1 comment
Open

Top padding safeAreaView inside Stack presentation modal #504

andredewaard opened this issue Jun 14, 2024 · 1 comment

Comments

@andredewaard
Copy link

andredewaard commented Jun 14, 2024

When using the inside an Stack presentationModal like

layout

<Stack.Screen
        name="[id]"
        options={{ headerShown: false, presentation: 'modal' }}
      ></Stack.Screen>

and inside [id].tsx

    <SafeAreaView style={{ flex: 1 }}>
      <ScrollView contentContainerClassName="flex-1">

the top padding on an iPhone 15 pro max is huge.
the useSafeAreaInsets returns 59px.

Screenshot 2024-06-14 at 10 42 28

While on android it doesnt add anything, Note that on Android it doesn't open in a modal but it doesnt apply enough padding.
Screenshot 2024-06-14 at 10 42 49

@jacobp100
Copy link
Collaborator

You need a SafeAreaProvider within each screen stack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants