Browse Source

Add missing modal options documentation + a few fixes

Guy Carmeli 4 years ago
parent
commit
5314a3e586
2 changed files with 26 additions and 3 deletions
  1. 7
    3
      website/api/api-events.mdx
  2. 19
    0
      website/api/options-modal.mdx

+ 7
- 3
website/api/api-events.mdx View File

151
 modalDismissedListener.remove();
151
 modalDismissedListener.remove();
152
 ```
152
 ```
153
 
153
 
154
+|      Parameter      | Description                          |
155
+| :-----------------: | :----------------------------------- |
156
+|   **componentId**   | Id of the modal                      |
157
+| **modalsDismissed** | Number of modals that were dismissed |
158
+
154
 ## registerModalAttemptedToDismissListener(iOS 13+ only)
159
 ## registerModalAttemptedToDismissListener(iOS 13+ only)
155
 
160
 
156
 Invoked only on iOS pageSheet modal when `swipeToDismiss` flag is set to true and modal was swiped down to dismiss.
161
 Invoked only on iOS pageSheet modal when `swipeToDismiss` flag is set to true and modal was swiped down to dismiss.
162
 });
167
 });
163
 ...
168
 ...
164
 // Unsubscribe
169
 // Unsubscribe
165
-modalDismissedListener.remove();
170
+modalAttemptedToDismissListener.remove();
166
 ```
171
 ```
167
 
172
 
168
 |    Parameter    | Description                      |
173
 |    Parameter    | Description                      |
185
 
190
 
186
 |      Parameter      | Description                          |
191
 |      Parameter      | Description                          |
187
 | :-----------------: | :----------------------------------- |
192
 | :-----------------: | :----------------------------------- |
188
-|   **componentId**   | Id of the modal                      |
189
-| **modalsDismissed** | Number of modals that were dismissed |
193
+|   **componentId**   | Id of the screen which was popped    |
190
 
194
 
191
 ## registerBottomTabSelectedListener
195
 ## registerBottomTabSelectedListener
192
 
196
 

+ 19
- 0
website/api/options-modal.mdx View File

1
+---
2
+id: options-modal
3
+title: Modal Options
4
+sidebar_label: Modal
5
+---
6
+
7
+```js
8
+const options = {
9
+  swipeToDismiss
10
+};
11
+```
12
+
13
+## `swipeToDismiss`
14
+
15
+Control wether this modal should be dismiss using swipe gesture when the `modalPresentationStyle` is `pageSheet`
16
+
17
+| Type                                  | Required | Platform |  Default |
18
+| ------------------------------------- | -------- | -------- | -------- |
19
+| boolean                               | No       | Both     | true     |