Skip to content

Commit

Permalink
fix: add headerShown check in modals (#924)
Browse files Browse the repository at this point in the history
Added platform-dependent checks for hiding headers in modal screens in the Example project.
  • Loading branch information
kacperkapusciak authored and WoLewicki committed May 20, 2021
1 parent 6739b8c commit 1a3280b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Example/src/screens/Modals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const App = (): JSX.Element => (
component={Alert}
options={{
stackPresentation: 'transparentModal',
headerShown: false,
headerShown: Platform.OS === 'android' ? false : undefined,
stackAnimation:
Platform.OS === 'android' ? 'slide_from_left' : 'default',
}}
Expand Down
2 changes: 1 addition & 1 deletion Example/src/screens/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const App = (): JSX.Element => (
component={Snack}
options={{
stackPresentation: 'transparentModal',
headerShown: false,
headerShown: Platform.OS === 'android' ? false : undefined,
stackAnimation:
Platform.OS === 'android' ? 'slide_from_left' : 'default',
}}
Expand Down
4 changes: 2 additions & 2 deletions Example/src/screens/StackPresentation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const App = (): JSX.Element => (
component={Alert}
options={{
stackPresentation: 'transparentModal',
headerShown: false,
headerShown: Platform.OS === 'android' ? false : undefined,
stackAnimation:
Platform.OS === 'android' ? 'slide_from_left' : 'default',
}}
Expand All @@ -140,7 +140,7 @@ const App = (): JSX.Element => (
component={Dialog}
options={{
stackPresentation: 'containedTransparentModal',
headerShown: false,
headerShown: Platform.OS === 'android' ? false : undefined,
stackAnimation: 'fade',
}}
/>
Expand Down

0 comments on commit 1a3280b

Please sign in to comment.