From 7ec0bb26884a5a0e3e24f06ca70d68426204e743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Barbet?= Date: Fri, 20 Mar 2020 09:49:19 +0000 Subject: [PATCH] fix: add docs --- docs/PROPSMETHODS.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/PROPSMETHODS.md b/docs/PROPSMETHODS.md index db05606a..dde4019e 100644 --- a/docs/PROPSMETHODS.md +++ b/docs/PROPSMETHODS.md @@ -287,19 +287,21 @@ Callback to subscribe to layout changes. Return the `LayoutRectangle` object fro The method to open the modal. -| Type | Required | -| -------- | --------- | -| function | Yes | +?> If you are using `snapPoint` prop, you can supply a `dest` argument to the `open` method, to open it to the top directly `open('top')`. You don't have to provide anything if you want the default behavior. + +| Type | Required | +| ------------------------------------ | --------- | +| function: (dest?: 'default' | 'top') | Yes | ### `close()` The method to close the modal. You don't need to call it to dismiss the modal, since you can swipe down to dismiss. -?> If you are using `alwaysOpen` props, you can supply a `dest` argument to the `close` method to reset it to the intial position `close('alwaysOpen')`, and avoiding to close it completely. +?> If you are using `alwaysOpen` prop, you can supply a `dest` argument to the `close` method to reset it to the intial position `close('alwaysOpen')`, and avoiding to close it completely. -| Type | Required | -| ------------------------------------------- | -------- | -| function: (dest: 'alwaysOpen' \| 'default') | No | +| Type | Required | +| -------------------------------------------- | -------- | +| function: (dest?: 'default' \| 'alwaysOpen') | No | ### `scrollTo()`