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

feat: introduce missing props from native-stack v5 (v6) #11958

Open
wants to merge 3 commits into
base: 6.x
Choose a base branch
from

Conversation

tboba
Copy link
Contributor

@tboba tboba commented Apr 23, 2024

Motivation

Follow-up for PR #11803 that introduced props from native-stack v5 to v7. Here, I'm migrating missing props also to native-stack v6. Take a look in original PR for more information about this change.

Test plan

You can test these props by checking how they affect screens after adjusting them in Native Stack example. Remember about setting presentation to formSheet while using sheetX props.

Some of the examples I've already prepared:

Using GestureResponseDistance on NewsFeed

This will enable changing the area of the gesture with a rectangle starting from the ~middle of the screen down to bottom.

NativeStack.tsx:139

      <Stack.Screen
        name="NewsFeed"
        component={NewsFeedScreen}
        options={{
          title: 'Feed',
          fullScreenGestureEnabled: true,
          gestureResponseDistance: {
            start: 40,
            end: 353,
            top: 400,
            bottom: 852,
          },
        }}
      />
Using sheet props on NewsFeed

This will change the NewsFeed screen to the form sheet with rounded corners and maximum height to the middle.

NativeStack.tsx:139

      <Stack.Screen
        name="NewsFeed"
        component={NewsFeedScreen}
        options={{
          title: 'Feed',
          presentation: 'formSheet',
          sheetAllowedDetents: 'medium',
          sheetCornerRadius: 32,
        }}
      />

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

Successfully merging this pull request may close these issues.

None yet

1 participant