Skip to content

Commit a62be8c

Browse files
authored
Add allowSwipeDismissal documentation (facebook#4658)
* Update moda docs * Apply suggestions from code review
1 parent 469d3d2 commit a62be8c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/modal.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,21 @@ The `onOrientationChange` callback is called when the orientation changes while
176176

177177
---
178178

179+
### `allowSwipeDismissal` <div class="label ios">iOS</div>
180+
181+
Controls whether the modal can be dismissed by swiping down on iOS.
182+
This requires you to implement the `onRequestClose` prop to handle the dismissal.
183+
184+
| Type | Default |
185+
| ---- | ------- |
186+
| bool | `false` |
187+
188+
---
189+
179190
### `onRequestClose`
180191

181192
The `onRequestClose` callback is called when the user taps the hardware back button on Android or the menu button on Apple TV. Because of this required prop, be aware that `BackHandler` events will not be emitted as long as the modal is open.
182-
On iOS, this callback is called when a Modal is being dismissed using a drag gesture when `presentationStyle` is `pageSheet or formSheet`
193+
On iOS, this callback is called when a Modal is being dismissed using a drag gesture when `presentationStyle` is `pageSheet or formSheet`. When `allowSwipeDismissal` is enabled this callback will be called after dismissing the modal.
183194

184195
| Type |
185196
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

0 commit comments

Comments
 (0)